You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can use userResource.create.auth(function(req, res, context) { }
to protect the auth action, but when I want to use the same auth check for all actions, I'd like to use something like userResource.allActions.auth(function(req, res, context) { }
Instead I need to use userResource.create.auth(function(req, res, context) { } userResource.list.auth(function(req, res, context) { } userResource.read.auth(function(req, res, context) { } userResource.update.auth(function(req, res, context) { } userResource.delete.auth(function(req, res, context) { }
Is a short version possible without producing lots of duplicate code?
The text was updated successfully, but these errors were encountered:
I can use
userResource.create.auth(function(req, res, context) { }
to protect the auth action, but when I want to use the same auth check for all actions, I'd like to use something like
userResource.allActions.auth(function(req, res, context) { }
Instead I need to use
userResource.create.auth(function(req, res, context) { }
userResource.list.auth(function(req, res, context) { }
userResource.read.auth(function(req, res, context) { }
userResource.update.auth(function(req, res, context) { }
userResource.delete.auth(function(req, res, context) { }
Is a short version possible without producing lots of duplicate code?
The text was updated successfully, but these errors were encountered: