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

19 lines
No EOL
454 B
JavaScript

import Route from "../route.js";
import auth from "../form/auth.js";
import initDb from "../db.js";
let db = await initDb();
let main = new Route([auth], async function (req, res, input) {
let { username } = input;
let videoData = await db.all('SELECT * FROM video WHERE id = ?', [
req.query.id
]);
videoData = videoData[0];
return res.render('player', {
username,
videoData
});
});
export default main;