Closed ckpiggy closed 5 years ago
Hi @ckpiggy, sorry for delay, here is the solution:
AUTH(function(req, res, flags, callback) {
callback(false);
});
// And then create a system route:
ROUTE('#401', function() {
this.json({ error: 'unauthorized' });
});
When callback(false) the framework will send html with 401. How can I customize the response data to JSON like: