Fix notifications.alert (async usage)
this broke the reboot button among other things
This commit is contained in:
@@ -137,19 +137,18 @@ function setupAccount(req, res, next) {
|
||||
});
|
||||
}
|
||||
|
||||
function reboot(req, res, next) {
|
||||
async function reboot(req, res, next) {
|
||||
// Finish the request, to let the appstore know we triggered the reboot
|
||||
next(new HttpSuccess(202, {}));
|
||||
|
||||
cloudron.reboot(function () {});
|
||||
await safe(cloudron.reboot());
|
||||
}
|
||||
|
||||
function isRebootRequired(req, res, next) {
|
||||
cloudron.isRebootRequired(function (error, result) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
async function isRebootRequired(req, res, next) {
|
||||
const [error, rebootRequired] = await safe(cloudron.isRebootRequired());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, { rebootRequired: result }));
|
||||
});
|
||||
next(new HttpSuccess(200, { rebootRequired }));
|
||||
}
|
||||
|
||||
function getConfig(req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user