settings: move support config to support

This commit is contained in:
Girish Ramakrishnan
2023-08-02 22:21:30 +05:30
parent eb4213d61d
commit fccc2d04a9
8 changed files with 62 additions and 33 deletions
-8
View File
@@ -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'));
}