mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 17:32:15 +03:00
db9c2d1eca
no issue
30 lines
1.1 KiB
JavaScript
30 lines
1.1 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');
|
|
}
|
|
};
|