From e049b2c566cf2c0abf31ddc5af8a0026641b2e73 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 12 Jul 2024 00:35:45 +0800 Subject: [PATCH] :bug: Fix suspend account check --- pkg/internal/server/api/auth_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/server/api/auth_api.go b/pkg/internal/server/api/auth_api.go index 13f4f13..f421073 100644 --- a/pkg/internal/server/api/auth_api.go +++ b/pkg/internal/server/api/auth_api.go @@ -40,7 +40,7 @@ func doAuthenticate(c *fiber.Ctx) error { return fiber.NewError(fiber.StatusBadRequest, fmt.Sprintf("account was not found: %v", err.Error())) } else if user.ConfirmedAt == nil { 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") }