settings: move support config to support
This commit is contained in:
@@ -54,13 +54,6 @@ async function setTimeZone(req, res, next) {
|
||||
next(new HttpSuccess(200, {}));
|
||||
}
|
||||
|
||||
async function getSupportConfig(req, res, next) {
|
||||
const [error, supportConfig] = await safe(settings.getSupportConfig());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, supportConfig));
|
||||
}
|
||||
|
||||
async function getBackupConfig(req, res, next) {
|
||||
const [error, backupConfig] = await safe(settings.getBackupConfig());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
@@ -314,7 +307,6 @@ function get(req, res, next) {
|
||||
case settings.TIME_ZONE_KEY: return getTimeZone(req, res, next);
|
||||
|
||||
case settings.PROFILE_CONFIG_KEY: return getProfileConfig(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