convert 404 page into json is only working for get method only
Closed this issue · 1 comments
aalfiann commented
Hello,
I've tried to convert the 404 page into json like this
ROUTE('#404', function() {
this.status = 404;
this.json({ error: 'Unauthorized' });
}, ['get','post']);
That only work for GET method only.
So my question is how to make it work for POST too?
petersirka commented
Yes, there was a bug - sorry for troubles. I have fixed it and I'll publish a new version of Total.js 4 today later. Now you can test the fix in beta version: $ npm install total4@beta
.
Thank you!