refactor: rename updater functions to have box in them

This commit is contained in:
Girish Ramakrishnan
2025-06-20 19:04:55 +02:00
parent d7fdfd6d71
commit 2db99e7807
6 changed files with 13 additions and 13 deletions

View File

@@ -40,7 +40,7 @@ async function update(req, res, next) {
if ('skipBackup' in req.body && typeof req.body.skipBackup !== 'boolean') return next(new HttpError(400, 'skipBackup must be a boolean'));
// this only initiates the update, progress can be checked via the progress route
const [error, taskId] = await safe(updater.updateToLatest(req.body, AuditSource.fromRequest(req)));
const [error, taskId] = await safe(updater.startBoxUpdateTask(req.body, AuditSource.fromRequest(req)));
if (error && error.reason === BoxError.NOT_FOUND) return next(new HttpError(422, error.message));
if (error && error.reason === BoxError.BAD_STATE) return next(new HttpError(409, error.message));
if (error) return next(new HttpError(500, error));