refactor: raw struct for store

This commit is contained in:
boojack
2022-05-19 18:32:04 +08:00
parent 0b50122aac
commit bc22f69ac5
22 changed files with 687 additions and 188 deletions

View File

@ -27,6 +27,8 @@ func (s *Server) registerAuthRoutes(g *echo.Group) {
}
if user == nil {
return echo.NewHTTPError(http.StatusUnauthorized, fmt.Sprintf("User not found with email %s", login.Email))
} else if user.RowStatus == api.Archived {
return echo.NewHTTPError(http.StatusForbidden, fmt.Sprintf("User has been archived with email %s", login.Email))
}
// Compare the stored hashed password, with the hashed version of the password that was received.