sealcode / sealious

An extensible, declarative node framework
25 stars 2 forks source link

Discrepancy of status on execute /logout #239

Closed arkadiusz-wieczorek closed 8 years ago

arkadiusz-wieczorek commented 9 years ago

We should return more fancy status on POST to /logout than 404. I propose brought to a common status. At now in client, we have 404 because request was redirected to logout.html, in my opinion should be returned only json with correctly status, a developer knows how to handle it.

{
    "statusCode": 404,
    "error": "Not Found"
}

In console, we have "success!":

18:20:35.976 - info:    POST /login
            from: 127.0.0.1, mime: multipart/form-data
            result: success!
18:20:43.539 - info: Killing session:  19c16ce0f3d5d6401f3b365832a221ef282f1955
18:20:43.539 - info:    POST /logout
            from: 127.0.0.1, mime: application/json
            result: success!
arkadiusz-wieczorek commented 9 years ago

Fix: https://github.com/Sealious/sealious-www-server/pull/41