settings: initCache and list are now async
This commit is contained in:
@@ -126,10 +126,9 @@ function restore(req, res, next) {
|
||||
});
|
||||
}
|
||||
|
||||
function getStatus(req, res, next) {
|
||||
provision.getStatus(function (error, status) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
async function getStatus(req, res, next) {
|
||||
const [error, status] = await safe(provision.getStatus());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, status));
|
||||
});
|
||||
next(new HttpSuccess(200, status));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user