move backup eventlog to model

This commit is contained in:
Girish Ramakrishnan
2016-05-01 11:42:12 -07:00
parent a969e323a6
commit fec388b648
5 changed files with 24 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ function backup(req, res, next) {
// note that cloudron.backup only waits for backup initiation and not for backup to complete
// backup progress can be checked up ny polling the progress api call
backups.backup(function (error) {
backups.backup({ userId: null, username: 'sysadmin' }, function (error) {
if (error && error.reason === BackupsError.BAD_STATE) return next(new HttpError(409, error.message));
if (error) return next(new HttpError(500, error));