UPDATE: Fix bug auth
All checks were successful
Build and Release / release (push) Successful in 53s

This commit is contained in:
2026-03-30 16:49:37 +07:00
parent a1496c5cd8
commit 44d0d0c973
5 changed files with 5 additions and 16 deletions

View File

@@ -227,7 +227,7 @@ func (a *authService) Signup(ctx context.Context, dto *request.SignUpDto) (*resp
}
user, err := a.userRepo.GetByEmail(ctx, dto.Email)
if err != nil {
if err != nil && !errors.Is(err, sql.ErrNoRows) {
return nil, fiber.NewError(fiber.StatusInternalServerError, err.Error())
}
if user != nil {
@@ -478,7 +478,7 @@ func (a *authService) CreateToken(ctx context.Context, dto *request.CreateTokenD
}
user, err := a.userRepo.GetByEmail(ctx, dto.Email)
if err != nil {
if err != nil && !errors.Is(err, sql.ErrNoRows) {
return fiber.NewError(fiber.StatusInternalServerError, "Internal Server Error")
}
@@ -533,7 +533,7 @@ func (a *authService) VerifyToken(ctx context.Context, dto *request.VerifyTokenD
}
user, err := a.userRepo.GetByEmail(ctx, dto.Email)
if err != nil {
if err != nil && !errors.Is(err, sql.ErrNoRows) {
return nil, fiber.NewError(fiber.StatusInternalServerError, "Internal Server Error")
}