deleting videos, 404
This commit is contained in:
parent
b38fb151ac
commit
62645ddd93
8 changed files with 67 additions and 5 deletions
11
client/e404.js
Normal file
11
client/e404.js
Normal 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;
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue