deleted login page serve

This commit is contained in:
Erik 2022-11-20 18:37:46 +02:00
parent 18d52123ef
commit 344ab017f9
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -1,40 +0,0 @@
const { Endpoint } = require("../../interfaces");
class LoginPage extends Endpoint {
constructor (server) {
super(server, {
name: 'loginpage',
path: '/login'
});
this.methods = [
[ 'get', this.login.bind(this) ]
];
this.subpaths = [
[ '/fail', 'get', this.failed.bind(this) ],
[ '/finalise', 'get', this.finalise.bind(this) ],
[ '/verify', 'get', this.verify.bind(this) ],
];
}
login (req, res) {
res.sendFile('login.html', { root: this.server.serveFiles });
}
finalise (req, res) { // Finalise account registration
res.sendFile('finalise.html', { root: this.server.serveFiles });
}
verify (req, res) { // Finalise account registration
res.sendFile('2fa.html', { root: this.server.serveFiles });
}
failed (req, res) {
res.status(401).send('Login failed');
}
}
module.exports = LoginPage;