vybe/src/list_threads.js

15 lines
292 B
JavaScript
Raw Normal View History

2023-05-08 20:51:17 -07:00
const db = require("../db");
const list_threads = async (msg, respond) => {
const threads = await db.query(
"select name, id from threads order by created desc"
);
// respond
return respond({
success: true,
threads: threads.rows,
});
};
module.exports = list_threads;