add opengraph stuff
This commit is contained in:
parent
42aaebbd69
commit
bde68d3797
14 changed files with 29 additions and 18 deletions
|
@ -7,7 +7,6 @@ let db = await initDb();
|
|||
let main = new Route([auth], async function (req, res, input) {
|
||||
let {route} = req.params;
|
||||
let {id} = req.query;
|
||||
let { username } = input;
|
||||
|
||||
let comments = await db.all('SELECT * FROM comment WHERE targetType = ? AND targetId = ? ORDER BY date DESC', [
|
||||
route,
|
||||
|
|
|
@ -2,9 +2,8 @@ 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
|
||||
...input
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import auth from "../form/auth.js";
|
|||
|
||||
// TODO: rewrite
|
||||
let main = new Route([auth], async function (req, res, input) {
|
||||
let { username } = input;
|
||||
return res.render('form', {
|
||||
data: [
|
||||
{ label: "Username", type: "text", name: "user" },
|
||||
|
@ -11,7 +10,7 @@ let main = new Route([auth], async function (req, res, input) {
|
|||
],
|
||||
'route': '/api/form/login?redirect=' + req.query.redirect,
|
||||
'title': 'Login',
|
||||
username
|
||||
...input
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ let main = new Route([auth], async function (req, res, input) {
|
|||
username
|
||||
]);
|
||||
return res.render('main', {
|
||||
username,
|
||||
...input,
|
||||
videos,
|
||||
videosFollow
|
||||
});
|
||||
|
|
|
@ -12,7 +12,8 @@ let main = new Route([comment], async function (req, res, input) {
|
|||
videoData = videoData[0];
|
||||
return res.render('player', {
|
||||
...input,
|
||||
videoData
|
||||
videoData,
|
||||
ogType: 'video'
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import auth from "../form/auth.js";
|
|||
|
||||
// TODO: rewrite
|
||||
let main = new Route([auth], async function (req, res, input) {
|
||||
let { username } = input;
|
||||
return res.render('form', {
|
||||
data: [
|
||||
{ label: "Description", type: "textarea", name: "desc" },
|
||||
|
@ -11,7 +10,7 @@ let main = new Route([auth], async function (req, res, input) {
|
|||
],
|
||||
'route': '/api/upload/settings',
|
||||
'title': 'User Settings',
|
||||
username
|
||||
...input
|
||||
}); /* todo: form in not a file */
|
||||
});
|
||||
|
||||
|
|
|
@ -2,9 +2,8 @@ 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('guidelines', {
|
||||
username
|
||||
...input
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import auth from "../form/auth.js";
|
|||
|
||||
// TODO: rewrite
|
||||
let main = new Route([auth], async function (req, res, input) {
|
||||
let { username } = input;
|
||||
return res.render('form', {
|
||||
data: [
|
||||
{ label: "Video file", type: "file", name: "file" },
|
||||
|
@ -12,7 +11,7 @@ let main = new Route([auth], async function (req, res, input) {
|
|||
],
|
||||
'route': '/api/upload/upload',
|
||||
'title': 'Upload Content',
|
||||
username
|
||||
...input
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -28,7 +28,8 @@ let main = new Route([comment], async function (req, res, input) {
|
|||
videos,
|
||||
followers,
|
||||
following,
|
||||
user
|
||||
user,
|
||||
icon: `${process.env.URL}/pfp/${id}.png`
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue