mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
c101fd90d7
* Installed `@tryghost/members-{api,auth-pages}` no-issue * Used @tryghost/members-auth-pages in member service no-issue * Used @tryghost/members-api in members service no-issue * Deleted core/server/lib/members no-issue * Fixed parent app tests no-issue Requiring the members api (via the `gateway` getter) was throwing an error, so we stub out the members service getters
38 lines
1.2 KiB
JavaScript
38 lines
1.2 KiB
JavaScript
const config = require('../../config/index.js');
|
|
const common = require('../../lib/common');
|
|
|
|
module.exports = {
|
|
get api() {
|
|
if (!config.get('enableDeveloperExperiments')) {
|
|
return {
|
|
apiRouter: function (req, res, next) {
|
|
return next(new common.errors.NotFoundError());
|
|
},
|
|
staticRouter: function (req, res, next) {
|
|
return next(new common.errors.NotFoundError());
|
|
},
|
|
ssr: {
|
|
exchangeTokenForSession: function () {
|
|
return Promise.reject(new common.errors.InternalServerError());
|
|
},
|
|
deleteSession: function () {
|
|
return Promise.reject(new common.errors.InternalServerError());
|
|
},
|
|
getMemberDataFromSession: function () {
|
|
return Promise.reject(new common.errors.InternalServerError());
|
|
}
|
|
}
|
|
};
|
|
}
|
|
return require('./api');
|
|
},
|
|
|
|
get authPages() {
|
|
return require('./authPages');
|
|
},
|
|
|
|
get gateway() {
|
|
return require('./api').staticRouter;
|
|
}
|
|
};
|