🐛 Fix suspend account check

This commit is contained in:
LittleSheep 2024-07-12 00:35:45 +08:00
parent 681eb3cf7f
commit e049b2c566

View File

@ -40,7 +40,7 @@ func doAuthenticate(c *fiber.Ctx) error {
return fiber.NewError(fiber.StatusBadRequest, fmt.Sprintf("account was not found: %v", err.Error())) return fiber.NewError(fiber.StatusBadRequest, fmt.Sprintf("account was not found: %v", err.Error()))
} else if user.ConfirmedAt == nil { } else if user.ConfirmedAt == nil {
return fiber.NewError(fiber.StatusForbidden, "account was not confirmed") return fiber.NewError(fiber.StatusForbidden, "account was not confirmed")
} else if user.SuspendedAt == nil { } else if user.SuspendedAt != nil {
return fiber.NewError(fiber.StatusForbidden, "account was suspended") return fiber.NewError(fiber.StatusForbidden, "account was suspended")
} }