Audit changes.

This commit is contained in:
jdl
2026-06-13 15:01:50 +02:00
parent 75782c4efd
commit fe5f26ed70
3 changed files with 14 additions and 9 deletions

View File

@@ -127,7 +127,7 @@ func (a *API) Session_SignIn(pwd string) (Session, error) {
return Session{}, errs.ErrUnexpected
}
if err := bcrypt.CompareHashAndPassword(conf.Password, []byte(pwd)); err != nil {
return Session{}, errs.NotAuthorized.WithMsg("Not authorized.")
return Session{}, errs.ErrNotAuthorized
}
a.sessionsMu.Lock()