mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update acl middleware
This commit is contained in:
@@ -72,8 +72,8 @@ func (s *Server) registerMemoRoutes(g *echo.Group) {
|
||||
memoFind.CreatorID = &userID
|
||||
}
|
||||
|
||||
currentUserID := c.Get(getUserIDContextKey()).(int)
|
||||
if currentUserID == api.UNKNOWN_ID {
|
||||
currentUserID, ok := c.Get(getUserIDContextKey()).(int)
|
||||
if !ok {
|
||||
if memoFind.CreatorID == nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "Missing user id to find memo")
|
||||
}
|
||||
|
Reference in New Issue
Block a user