Files
cloudron-box/src/routes/user.js
T
Girish Ramakrishnan 240ee5f563 Ensure we hand out max user.scope
The token.scope was valid at token creation time. The user's scope
could since have changed (maybe we got kicked out of a group).
2018-04-30 22:51:57 -07:00

21 lines
660 B
JavaScript

'use strict';
exports = module.exports = {
getCloudronConfig: getCloudronConfig
};
var cloudron = require('../cloudron.js'),
HttpError = require('connect-lastmile').HttpError,
HttpSuccess = require('connect-lastmile').HttpSuccess,
_ = require('underscore');
function getCloudronConfig(req, res, next) {
cloudron.getConfig(function (error, cloudronConfig) {
if (error) return next(new HttpError(500, error));
var result = _.pick(cloudronConfig, 'apiServerOrigin', 'webServerOrigin', 'fqdn', 'adminFqdn', 'version', 'progress', 'isDemo', 'cloudronName', 'provider');
next(new HttpSuccess(200, result));
});
}