bigly-chat/client/user.js
2024-11-25 14:12:43 -05:00

19 lines
No EOL
454 B
JavaScript

import Route from "../route.js";
import comment from "./comment.js";
import initDb from "../db.js";
let db = await initDb();
let main = new Route([comment], async function (req, res, input) {
let { id } = req.query;
let videos = await db.all('SELECT * FROM video WHERE username = ? ORDER BY date DESC', [
req.query.id
]);
return res.render('user', {
...input,
id,
videos
});
});
export default main;