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
Hi There,
Is there any way to put a middleware in restify object of routes.js file to check whether the User is Verified/Active, up on middleware fail api calls might return 400 bad request saying "Account need to be Verified/Active to do this action".
My wired thought is like, passing the list of middlewares before routing.
Example.
restify.user ('/api/test/user', [LIST_OF_MIDDLEWARES], c.api.test, ['list', 'get']);
The reason behind this is, I need to get the support of Restify.prototype._sendError for output json object.
If I am thinking wrong, can you please tell me the appropriate way of doing this.
The text was updated successfully, but these errors were encountered:
Hi There,
Is there any way to put a middleware in restify object of routes.js file to check whether the User is Verified/Active, up on middleware fail api calls might return 400 bad request saying "Account need to be Verified/Active to do this action".
My wired thought is like, passing the list of middlewares before routing.
Example.
restify.user ('/api/test/user', [LIST_OF_MIDDLEWARES], c.api.test, ['list', 'get']);
The reason behind this is, I need to get the support of Restify.prototype._sendError for output json object.
If I am thinking wrong, can you please tell me the appropriate way of doing this.
The text was updated successfully, but these errors were encountered: