operator: add app task status route

This commit is contained in:
Girish Ramakrishnan
2021-09-21 22:19:20 -07:00
parent d7bd3dfe7c
commit 214540ebfa
3 changed files with 20 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ exports = module.exports = {
backup,
listBackups,
getTask,
getLocalLogfilePaths,
getLogs,
@@ -934,6 +935,13 @@ async function listByUser(user) {
return result.filter((app) => canAccess(app, user));
}
async function getTask(app) {
assert.strictEqual(typeof app, 'object');
if (!app.taskId) return null;
return await tasks.get(app.taskId);
}
async function downloadManifest(appStoreId, manifest) {
if (!appStoreId && !manifest) throw new BoxError(BoxError.BAD_FIELD, 'Neither manifest nor appStoreId provided');