FEATURE: backup without uploads

This commit is contained in:
Régis Hanol
2014-08-20 18:48:56 +02:00
parent 7a621d97b9
commit 8a20d05ba5
12 changed files with 82 additions and 35 deletions

View File

@ -52,8 +52,9 @@ Discourse.Backup.reopenClass({
@method start
@returns {Promise} a promise that resolves when the backup has started
**/
start: function() {
return Discourse.ajax("/admin/backups", { type: "POST" }).then(function(result) {
start: function (withUploads) {
if (withUploads === undefined) { withUploads = true; }
return Discourse.ajax("/admin/backups", { type: "POST", data: { with_uploads: withUploads } }).then(function(result) {
if (!result.success) { bootbox.alert(result.message); }
});
},