create -> scheduleBackup
This commit is contained in:
+2
-2
@@ -11,7 +11,7 @@ exports = module.exports = {
|
||||
BackupsError: BackupsError,
|
||||
|
||||
getAll: getAll,
|
||||
create: create,
|
||||
scheduleBackup: scheduleBackup,
|
||||
|
||||
getBackupUrl: getBackupUrl,
|
||||
getRestoreUrl: getRestoreUrl
|
||||
@@ -52,7 +52,7 @@ function getAll(callback) {
|
||||
});
|
||||
}
|
||||
|
||||
function create(callback) {
|
||||
function scheduleBackup(callback) {
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
cloudron.backup(function (error) {
|
||||
|
||||
@@ -20,8 +20,8 @@ function get(req, res, next) {
|
||||
}
|
||||
|
||||
function create(req, res, next) {
|
||||
backups.create(function (error) {
|
||||
backups.scheduleBackup(function (error) {
|
||||
if (error) return next(new HttpError(500, error));
|
||||
next(new HttpSuccess(202, {}));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user