user page, meta fixes, css updates

This commit is contained in:
biglyderv 2024-09-20 16:59:12 -04:00
parent ab18ad9ec9
commit a473e38a87
No known key found for this signature in database
GPG key ID: 33AC87E9ACE66954
6 changed files with 47 additions and 6 deletions

View file

@ -7,7 +7,6 @@ let db = await initDb();
let main = new Route([auth], async function (req, res, input) {
let { username } = input;
let videos = await db.all('SELECT * FROM video ORDER BY date DESC', [
req.query.id
]);
return res.render('main', {
username,

20
client/user.js Normal file
View file

@ -0,0 +1,20 @@
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 { id } = req.query;
let { username } = input;
let videos = await db.all('SELECT * FROM video WHERE username = ? ORDER BY date DESC', [
req.query.id
]);
return res.render('user', {
username,
id,
videos
});
});
export default main;