mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
19 lines
681 B
JavaScript
19 lines
681 B
JavaScript
|
const membersService = require('../../services/members');
|
||
|
|
||
|
module.exports = {
|
||
|
docName: 'members_stripe_connect',
|
||
|
auth: {
|
||
|
permissions: true,
|
||
|
query(frame) {
|
||
|
// This is something you have to do if you want to use the "framework" with access to the raw req/res
|
||
|
frame.response = async function (req, res) {
|
||
|
function setSessionProp(prop, val) {
|
||
|
req.session[prop] = val;
|
||
|
}
|
||
|
const stripeConnectAuthURL = await membersService.stripeConnect.getStripeConnectOAuthUrl(setSessionProp);
|
||
|
return res.redirect(stripeConnectAuthURL);
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
};
|