0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Updated session API status code for logged out member

refs https://github.com/TryGhost/Team/issues/560
refs 69b773d112

The endpoint `/members/api/session/` is used by Portal for fetching member session while setting up and redirecting to Stripe Checkout flow. The status code returned by API for logged out member is changed from 4xx Unauthorized to 204 No Content, which is consistent with the status code returned while fetching member data when logged out. This API is made just before initiating the checkout session, and is not noticable in most cases due to redirect to Stripe Checkout and got missed.
This commit is contained in:
Rishabh 2021-07-30 10:33:06 +05:30
parent ac0bf227f5
commit 24b2a82461
2 changed files with 3 additions and 3 deletions

View file

@ -28,8 +28,8 @@ const getIdentityToken = async function (req, res) {
res.writeHead(200);
res.end(token);
} catch (err) {
res.writeHead(err.statusCode);
res.end(err.message);
res.writeHead(204);
res.end();
}
};

View file

@ -122,6 +122,6 @@
},
"portal": {
"url": "https://unpkg.com/@tryghost/portal@~1.7.0/umd/portal.min.js",
"version": "1.7"
"version": "1.8"
}
}