chore: release v0.4.3

This commit is contained in:
Steven
2022-09-09 20:00:04 +08:00
parent d1a4348048
commit b8a7df21f2
6 changed files with 16 additions and 9 deletions

View File

@ -71,7 +71,7 @@ func aclMiddleware(s *Server, next echo.HandlerFunc) echo.HandlerFunc {
OpenID: &openID,
}
user, err := s.Store.FindUser(ctx, userFind)
if err != nil {
if err != nil && common.ErrorCode(err) != common.NotFound {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find user by open_id").SetInternal(err)
}
if user != nil {
@ -90,7 +90,7 @@ func aclMiddleware(s *Server, next echo.HandlerFunc) echo.HandlerFunc {
ID: &userID,
}
user, err := s.Store.FindUser(ctx, userFind)
if err != nil {
if err != nil && common.ErrorCode(err) != common.NotFound {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to find user by ID: %d", userID)).SetInternal(err)
}
if user != nil {