user page, meta fixes, css updates
This commit is contained in:
parent
016f8b91b1
commit
2f0b0fb39f
6 changed files with 47 additions and 6 deletions
|
@ -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
20
client/user.js
Normal 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;
|
Loading…
Add table
Add a link
Reference in a new issue