settings: initCache and list are now async
This commit is contained in:
@@ -156,12 +156,11 @@ async function isRebootRequired(req, res, next) {
|
||||
next(new HttpSuccess(200, { rebootRequired }));
|
||||
}
|
||||
|
||||
function getConfig(req, res, next) {
|
||||
cloudron.getConfig(function (error, cloudronConfig) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
async function getConfig(req, res, next) {
|
||||
const [error, cloudronConfig] = await safe(cloudron.getConfig());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, cloudronConfig));
|
||||
});
|
||||
next(new HttpSuccess(200, cloudronConfig));
|
||||
}
|
||||
|
||||
function getDisks(req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user