Skip to content

Commit

Permalink
Don't check for object in collection actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Jan 17, 2018
1 parent 1563f9c commit 7a24c22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,10 @@ func (s *Server) handle(rw http.ResponseWriter, req *http.Request) (*types.APICo
}

func handleAction(action *types.Action, context *types.APIContext) error {
if err := access.ByID(context, context.Version, context.Type, context.ID, nil); err != nil {
return err
if context.ID != "" {
if err := access.ByID(context, context.Version, context.Type, context.ID, nil); err != nil {
return err
}
}
return context.Schema.ActionHandler(context.Action, action, context)
}
Expand Down

0 comments on commit 7a24c22

Please sign in to comment.