stuff
This commit is contained in:
parent
481719397c
commit
5ec060ee30
8 changed files with 54 additions and 24 deletions
|
@ -1,13 +1,17 @@
|
|||
import Route from "../route.js";
|
||||
import auth from "../form/auth.js";
|
||||
|
||||
// TODO: rewrite
|
||||
let main = new Route([], async function (req, res, input) {
|
||||
let main = new Route([auth], async function (req, res, input) {
|
||||
let { username } = input;
|
||||
return res.render('form', {
|
||||
data: [
|
||||
{ label: "Username", type: "text", name: "user" },
|
||||
{ label: "Password", type: "password", name: "pass" }
|
||||
],
|
||||
'route': '/api/form/login'
|
||||
'route': '/api/form/login',
|
||||
'title': 'Login',
|
||||
username
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
import Route from "../route.js";
|
||||
import auth from "../form/auth.js";
|
||||
|
||||
// TODO: rewrite
|
||||
let main = new Route([], async function (req, res, input) {
|
||||
let main = new Route([auth], async function (req, res, input) {
|
||||
let { username } = input;
|
||||
return res.render('form', {
|
||||
data: [
|
||||
{ label: "Username", type: "text", name: "user" },
|
||||
{ label: "Password", type: "password", name: "pass" },
|
||||
{ label: "Password (again)", type: "password", name: "pass2" }
|
||||
],
|
||||
'route': '/api/form/register'
|
||||
'route': '/api/form/register',
|
||||
'title': 'Join',
|
||||
username
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue