refactor: updated swagger;
feat: helper function in errors for checking postgres error types; feat: sql query method for finding users by their email; feat: registration begin/complete with checking existing username/email; refactor: error handling in controller
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
var (
|
||||
ErrUnauthorized = errors.New("User is not authorized")
|
||||
ErrUsernameTaken = errors.New("Provided username is already in use")
|
||||
ErrEmailTaken = errors.New("Provided email is already in use")
|
||||
ErrUserNotFound = errors.New("User was not found")
|
||||
ErrInvalidCredentials = errors.New("Invalid username, password or TOTP code")
|
||||
ErrInvalidToken = errors.New("Token is invalid or expired")
|
||||
|
||||
Reference in New Issue
Block a user