mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-12 06:25:51 +03:00
4b695d3b1a
closes #2743 - remove settings/debug route and associated files - reimplementation at debug route
38 lines
1.2 KiB
JavaScript
38 lines
1.2 KiB
JavaScript
/*global alert, console */
|
|
|
|
var Debug = Ember.Controller.extend(Ember.Evented, {
|
|
uploadButtonText: 'Import',
|
|
actions: {
|
|
importData: function (file) {
|
|
var self = this;
|
|
this.set('uploadButtonText', 'Importing');
|
|
this.get('model').importFrom(file)
|
|
.then(function (response) {
|
|
console.log(response);
|
|
alert('@TODO: success');
|
|
})
|
|
.catch(function (response) {
|
|
console.log(response);
|
|
alert('@TODO: error');
|
|
})
|
|
.finally(function () {
|
|
self.set('uploadButtonText', 'Import');
|
|
self.trigger('reset');
|
|
});
|
|
},
|
|
sendTestEmail: function () {
|
|
this.get('model').sendTestEmail()
|
|
.then(function (response) {
|
|
console.log(response);
|
|
alert('@TODO: success');
|
|
})
|
|
.catch(function (response) {
|
|
console.log(response);
|
|
alert('@TODO: error');
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
export default Debug;
|