totaljs/framework4

convert 404 page into json is only working for get method only

Closed this issue · 1 comments

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?

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!