use status ok on incorrect password

This commit is contained in:
SowinskiBraeden committed 2022-05-22 19:27:17 -07:00
1 parent 7573ebcdf4
commit 6bb2607420
3 files changed
+8 -8

No files matched your search

+3 -3
View File
@@ -566,7 +566,7 @@ func StudentLogin(c *fiber.Ctx) error {
"error": updateErr,
})
}
return c.Status(fiber.StatusUnauthorized).JSON(fiber.Map{
return c.Status(fiber.StatusOK).JSON(fiber.Map{
"success": false,
"message": "incorrect password",
})
@@ -637,7 +637,7 @@ func TeacherLogin(c *fiber.Ctx) error {
var verified bool = teacher.ComparePasswords(data["password"])
if verified == false {
return c.Status(fiber.StatusUnauthorized).JSON(fiber.Map{
return c.Status(fiber.StatusOK).JSON(fiber.Map{
"success": false,
"message": "incorrect password",
})
@@ -707,7 +707,7 @@ func AdminLogin(c *fiber.Ctx) error {
var verified bool = admin.ComparePasswords(data["password"])
if verified == false {
return c.Status(fiber.StatusUnauthorized).JSON(fiber.Map{
return c.Status(fiber.StatusOK).JSON(fiber.Map{
"success": false,
"message": "incorrect password",
})