mirror of
https://github.com/SileNce5k/discord_bot_mgmt.git
synced 2025-04-19 19:16:20 +02:00
Improve login
Remove duplicate ejs file for easier development
This commit is contained in:
parent
af81457672
commit
564768d32c
3 changed files with 4 additions and 16 deletions
|
@ -133,9 +133,10 @@ app.get('/logout', (req, res) => {
|
||||||
|
|
||||||
app.get('/login', (req, res) => {
|
app.get('/login', (req, res) => {
|
||||||
if(req.query.invalid === "yes"){
|
if(req.query.invalid === "yes"){
|
||||||
res.render("login_incorrect")
|
let invalidMessage = "Username or password incorrect"
|
||||||
|
res.render("login", {invalid_login: true, invalid_message: invalidMessage})
|
||||||
}else{
|
}else{
|
||||||
res.render("login")
|
res.render("login", {invalid_login: false, invalid_message: ""})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Discord Bot Control Panel</title>
|
|
||||||
<link rel="stylesheet" href="/css/main.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Not logged in</h1>
|
|
||||||
<p>Please <a href="/login">login</a> before you can access the control panel.</p>
|
|
||||||
<p>Register <a href="/register">here</a></p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -13,6 +13,7 @@
|
||||||
<label for="password">Password</label>
|
<label for="password">Password</label>
|
||||||
<input type="password" name="password" size="29" required > <br/>
|
<input type="password" name="password" size="29" required > <br/>
|
||||||
<input type="submit" value="Login">
|
<input type="submit" value="Login">
|
||||||
|
<p id="incorrect-login"><%= invalid_message %></p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Add table
Reference in a new issue