mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Updated README for new members-ssr API
no-issue
This commit is contained in:
parent
667061676b
commit
49380c3dc4
@ -24,7 +24,7 @@ const {
|
||||
cookieName: 'members-ssr', // Name of cookie (default)
|
||||
cookiePath: '/', // Path of cookie (default)
|
||||
cookieKeys: 'some-coole-secret', // Key to sign cookie with
|
||||
membersApi: membersApiInstance // Used to fetch data and verify tokens
|
||||
getMembersApi: () => membersApiInstance // Used to fetch data and verify tokens
|
||||
});
|
||||
|
||||
const handleError = res => err => {
|
||||
@ -34,9 +34,9 @@ const handleError = res => err => {
|
||||
|
||||
require('http').createServer((req, res) => {
|
||||
if (req.method.toLowerCase() === 'post') {
|
||||
exchangeTokenForSession(req, res).then(() => {
|
||||
exchangeTokenForSession(req, res).then((member) => {
|
||||
res.writeHead(200);
|
||||
res.end();
|
||||
res.end(JSON.stringify(member));
|
||||
}).catch(handleError(res));
|
||||
} else if (req.method.toLowerCase() === 'delete') {
|
||||
deleteSession(req, res).then(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user