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

@@ -196,13 +196,12 @@ function getUpdateInfo(req, res, next) {
next(new HttpSuccess(200, { update: updateChecker.getUpdateInfo() }));
}
function checkForUpdates(req, res, next) {
async function checkForUpdates(req, res, next) {
// it can take a while sometimes to get all the app updates one by one
req.clearTimeout();
updateChecker.checkForUpdates({ automatic: false }, function () {
next(new HttpSuccess(200, { update: updateChecker.getUpdateInfo() }));
});
await updateChecker.checkForUpdates({ automatic: false });
next(new HttpSuccess(200, { update: updateChecker.getUpdateInfo() }));
}
function getLogs(req, res, next) {