deleting videos, 404

This commit is contained in:
biglyderv 2024-11-25 14:12:44 -05:00
parent b38fb151ac
commit 62645ddd93
8 changed files with 67 additions and 5 deletions

11
client/e404.js Normal file
View file

@ -0,0 +1,11 @@
import Route from "../route.js";
import auth from "../form/auth.js";
let main = new Route([auth], async function (req, res, input) {
let { username } = input;
return res.render('404', {
username
});
});
export default main;

View file

@ -8,6 +8,7 @@ let main = new Route([comment], async function (req, res, input) {
let videoData = await db.all('SELECT * FROM video WHERE id = ?', [
req.query.id
]);
if (videoData.length == 0) return;
videoData = videoData[0];
return res.render('player', {
...input,

View file

@ -22,6 +22,10 @@ let main = new Route([comment], async function (req, res, input) {
req.query.id
]);
if (user.length == 0) {
return;
}
return res.render('user', {
...input,
id,