appstore and support: async'ify

This commit is contained in:
Girish Ramakrishnan
2021-08-18 15:54:53 -07:00
parent 200018a022
commit 03e22170da
16 changed files with 458 additions and 633 deletions

View File

@@ -58,12 +58,11 @@ function setTimeZone(req, res, next) {
});
}
function getSupportConfig(req, res, next) {
settings.getSupportConfig(function (error, supportConfig) {
if (error) return next(BoxError.toHttpError(error));
async function getSupportConfig(req, res, next) {
const [error, supportConfig] = await settings.getSupportConfig();
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, supportConfig));
});
next(new HttpSuccess(200, supportConfig));
}
function getBackupConfig(req, res, next) {