create -> scheduleBackup

This commit is contained in:
Girish Ramakrishnan
2015-06-18 22:36:11 -07:00
parent 66bd5d0f37
commit bebd70368f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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) {
+2 -2
View File
@@ -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, {}));
});
}
}