chore: update one of auth middleware errors status code

This commit is contained in:
2025-06-11 15:38:12 +01:00
parent 8a313d089f
commit a422aeee3e
+1 -1
View File
@@ -36,7 +36,7 @@ func (api *API) AuthSessionMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
var user types.User
if err := api.db.GetUserBySessionId(sessionId, &user); err != nil {
return types.Error{Code: http.StatusUnauthorized, Messages: []string{"User not authenticated!"}}
return types.Error{Code: http.StatusNotFound, Messages: []string{"User not found!"}}
}
context.Set("id", sess.Values["id"])