fix(service,user): update UsernameExists error

This commit is contained in:
Guz
2025-06-13 19:16:34 -03:00
parent 8a014f617c
commit c40f3cc9f0

View File

@@ -35,7 +35,7 @@ func (svc *User) Register(username, password string) (model.User, error) {
defer log.Info("Finished registering user")
if _, err := svc.repo.GetByUsername(username); err == nil {
return model.User{}, ErrAlreadyExists
return model.User{}, ErrUsernameAlreadyExists
}
hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)