mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Use member cookie on comment API
refs https://github.com/TryGhost/Team/issues/1664
This commit is contained in:
parent
42fc272433
commit
f5ccec70b6
1 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,7 @@ const express = require('../../../shared/express');
|
||||||
const urlUtils = require('../../../shared/url-utils');
|
const urlUtils = require('../../../shared/url-utils');
|
||||||
const sentry = require('../../../shared/sentry');
|
const sentry = require('../../../shared/sentry');
|
||||||
const routes = require('./routes');
|
const routes = require('./routes');
|
||||||
|
const membersService = require('../../../server/services/members');
|
||||||
|
|
||||||
module.exports = function setupCommentsApp() {
|
module.exports = function setupCommentsApp() {
|
||||||
debug('Comments App setup start');
|
debug('Comments App setup start');
|
||||||
|
@ -17,6 +18,9 @@ module.exports = function setupCommentsApp() {
|
||||||
|
|
||||||
commentsApp.use(bodyParser.json({limit: '50mb'}));
|
commentsApp.use(bodyParser.json({limit: '50mb'}));
|
||||||
|
|
||||||
|
// Global handling for member session, ensures a member is logged in to the frontend
|
||||||
|
commentsApp.use(membersService.middleware.loadMemberSession);
|
||||||
|
|
||||||
// Routing
|
// Routing
|
||||||
commentsApp.use('/api/', routes());
|
commentsApp.use('/api/', routes());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue