Add supportConfig in database
This commit is contained in:
@@ -117,6 +117,14 @@ function setFooter(req, res, next) {
|
||||
});
|
||||
}
|
||||
|
||||
function getSupportConfig(req, res, next) {
|
||||
settings.getSupportConfig(function (error, supportConfig) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, supportConfig));
|
||||
});
|
||||
}
|
||||
|
||||
function setCloudronAvatar(req, res, next) {
|
||||
assert.strictEqual(typeof req.files, 'object');
|
||||
|
||||
@@ -330,6 +338,8 @@ function get(req, res, next) {
|
||||
|
||||
case settings.CLOUDRON_AVATAR_KEY: return getCloudronAvatar(req, res, next);
|
||||
|
||||
case settings.SUPPORT_CONFIG_KEY: return getSupportConfig(req, res, next);
|
||||
|
||||
default: return next(new HttpError(404, 'No such setting'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user