2019-02-26 10:09:16 +07:00
|
|
|
const config = require('../../config/index.js');
|
|
|
|
const common = require('../../lib/common');
|
|
|
|
|
2018-12-11 14:57:01 +07:00
|
|
|
module.exports = {
|
|
|
|
get api() {
|
2019-02-26 10:09:16 +07:00
|
|
|
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());
|
2019-04-17 17:38:12 +05:30
|
|
|
},
|
|
|
|
ssr: {
|
2019-04-17 18:26:32 +05:30
|
|
|
exchangeTokenForSession: function () {
|
2019-04-17 17:38:12 +05:30
|
|
|
return Promise.reject(new common.errors.InternalServerError());
|
|
|
|
},
|
2019-04-17 18:26:32 +05:30
|
|
|
deleteSession: function () {
|
2019-04-17 17:38:12 +05:30
|
|
|
return Promise.reject(new common.errors.InternalServerError());
|
|
|
|
},
|
2019-04-17 18:26:32 +05:30
|
|
|
getMemberDataFromSession: function () {
|
2019-04-17 17:38:12 +05:30
|
|
|
return Promise.reject(new common.errors.InternalServerError());
|
|
|
|
}
|
2019-02-26 10:09:16 +07:00
|
|
|
}
|
|
|
|
};
|
2018-12-11 14:57:01 +07:00
|
|
|
}
|
|
|
|
return require('./api');
|
|
|
|
}
|
|
|
|
};
|