apps: add backup start and finish events

these can then be used by the UI to show errors

fixes #797
This commit is contained in:
Girish Ramakrishnan
2021-09-30 10:45:25 -07:00
parent b0bdfbd870
commit 092b55d6ca
5 changed files with 22 additions and 13 deletions
+1 -1
View File
@@ -509,7 +509,7 @@ async function clone(req, res, next) {
async function backup(req, res, next) {
assert.strictEqual(typeof req.app, 'object');
const [error, result] = await safe(apps.backup(req.app));
const [error, result] = await safe(apps.backup(req.app, AuditSource.fromRequest(req)));
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(202, { taskId: result.taskId }));