is anyone reading these commit msgs
This commit is contained in:
parent
dabbc7d862
commit
40f9c219b8
9 changed files with 66 additions and 10 deletions
|
@ -1,10 +1,17 @@
|
|||
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 videos = await db.all('SELECT * FROM video ORDER BY date DESC', [
|
||||
req.query.id
|
||||
]);
|
||||
return res.render('main', {
|
||||
username
|
||||
username,
|
||||
videos
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ let main = new Route([auth], async function (req, res, input) {
|
|||
data: [
|
||||
{ label: "Video file", type: "file", name: "file" },
|
||||
{ label: "Name", type: "text", name: "title" },
|
||||
{ label: "Description", type: "text", name: "desc" }
|
||||
{ label: "Description", type: "textarea", name: "desc" }
|
||||
],
|
||||
'route': '/api/upload/upload',
|
||||
'title': 'Upload Content',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue