mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-14 16:52:47 +02:00
add LockedLogins to settings.
This commit is contained in:
parent
a178bede87
commit
a61eade929
5 changed files with 16 additions and 0 deletions
|
@ -33,6 +33,8 @@ func (api *ApiManagerCtx) Login(w http.ResponseWriter, r *http.Request) error {
|
|||
return utils.HttpUnprocessableEntity("session already connected")
|
||||
} else if errors.Is(err, types.ErrMemberDoesNotExist) || errors.Is(err, types.ErrMemberInvalidPassword) {
|
||||
return utils.HttpUnauthorized().WithInternalErr(err)
|
||||
} else if errors.Is(err, types.ErrSessionLoginsLocked) {
|
||||
return utils.HttpForbidden("logins are locked").WithInternalErr(err)
|
||||
} else {
|
||||
return utils.HttpInternalServerError().WithInternalErr(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue