Proper login endpoint functionality
This commit is contained in:
parent
c6d9307979
commit
c13378d3b9
2 changed files with 11 additions and 2 deletions
|
@ -110,8 +110,7 @@ func (gs *GState) Login(c *fiber.Ctx) error {
|
|||
user := c.FormValue("user")
|
||||
pass := c.FormValue("pass")
|
||||
|
||||
// Throws Unauthorized error
|
||||
if user != "user" || pass != "pass" {
|
||||
if !gs.Db.CheckUser(user, pass) {
|
||||
return c.SendStatus(fiber.StatusUnauthorized)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue