mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Updated members api to use middleware exposed
no-issue
This commit is contained in:
parent
11e246a93a
commit
ab18905c76
2 changed files with 4 additions and 4 deletions
|
@ -18,9 +18,9 @@ module.exports = function setupMembersApiApp() {
|
|||
const siteUrl = new URL(urlUtils.getSiteUrl());
|
||||
apiApp.use(cors(siteUrl.origin));
|
||||
|
||||
// Set up the api endpoints and the gateway
|
||||
// NOTE: this is wrapped in a function to ensure we always go via the getter
|
||||
apiApp.use((req, res, next) => membersService.api(req, res, next));
|
||||
apiApp.post('/send-magic-link', (req, res, next) => membersService.api.middleware.sendMagicLink(req, res, next));
|
||||
apiApp.post('/create-stripe-checkout-session', (req, res, next) => membersService.api.middleware.createCheckoutSession(req, res, next));
|
||||
|
||||
// API error handling
|
||||
apiApp.use(shared.middlewares.errorHandler.resourceNotFound);
|
||||
|
|
|
@ -18,9 +18,9 @@ module.exports = function setupMembersApiApp() {
|
|||
const siteUrl = new URL(urlUtils.getSiteUrl());
|
||||
apiApp.use(cors(siteUrl.origin));
|
||||
|
||||
// Set up the api endpoints and the gateway
|
||||
// NOTE: this is wrapped in a function to ensure we always go via the getter
|
||||
apiApp.use((req, res, next) => membersService.api(req, res, next));
|
||||
apiApp.post('/send-magic-link', (req, res, next) => membersService.api.middleware.sendMagicLink(req, res, next));
|
||||
apiApp.post('/create-stripe-checkout-session', (req, res, next) => membersService.api.middleware.createCheckoutSession(req, res, next));
|
||||
|
||||
// API error handling
|
||||
apiApp.use(shared.middlewares.errorHandler.resourceNotFound);
|
||||
|
|
Loading…
Reference in a new issue