chore: Update database configuration and enhance error handling

- Changed database credentials in start.sh for testing purposes.
- Added environment variable for testing and allowed origins in start.sh.
- Improved error handling in yggdrasil_auth_service.go by checking for nil user before returning an error.
This commit is contained in:
lan
2025-12-04 22:35:03 +08:00
parent 8858fd1ede
commit 432c47d969
2 changed files with 8 additions and 3 deletions

View File

@@ -42,6 +42,9 @@ func (s *yggdrasilAuthService) GetUserIDByEmail(ctx context.Context, email strin
if err != nil {
return 0, apperrors.ErrUserNotFound
}
if user == nil {
return 0, apperrors.ErrUserNotFound
}
return user.ID, nil
}