add opengraph stuff
This commit is contained in:
parent
42aaebbd69
commit
bde68d3797
14 changed files with 29 additions and 18 deletions
|
@ -4,6 +4,9 @@ import initDb from "../db.js";
|
|||
let db = await initDb();
|
||||
|
||||
let main = new Route([], async function (req, res, input) {
|
||||
let {route} = req.params;
|
||||
let {id} = req.query;
|
||||
|
||||
let body = { ...req.cookies, ...req.body };
|
||||
|
||||
let { token } = body;
|
||||
|
@ -20,7 +23,11 @@ let main = new Route([], async function (req, res, input) {
|
|||
|
||||
return {
|
||||
username,
|
||||
valid: valid[0] ? valid[0].valid : 'noexist'
|
||||
valid: valid[0] ? valid[0].valid : 'noexist',
|
||||
url: `${process.env.URL}/client/${route}?id=${id || ''}`,
|
||||
icon: `${process.env.URL}/static/img/logo.png`,
|
||||
rootUrl: process.env.URL,
|
||||
ogType: 'website'
|
||||
};
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue