is anyone reading these commit msgs

This commit is contained in:
biglyderv 2024-11-25 14:12:43 -05:00
parent dabbc7d862
commit 40f9c219b8
9 changed files with 66 additions and 10 deletions

View file

@ -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
});
});

View file

@ -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',