deleted login page serve
This commit is contained in:
parent
18d52123ef
commit
344ab017f9
@ -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;
|
Loading…
Reference in New Issue
Block a user