Ghost/ghost/admin/controllers/modals/delete-all.js
Harry Wolff 45ccad58f9 Settings: Admin User Tab
closes #2422

- updated to use new change password method
- have all save settings use notifications
- create assetUrl helper for creating asset paths with subdir's properly
 prefixed
- move all url based helpers onto a url object in ghost-paths
2014-07-14 08:52:06 -04:00

33 lines
812 B
JavaScript

var DeleteAllController = Ember.Controller.extend({
actions: {
confirmAccept: function () {
var self = this;
ic.ajax.request(this.get('ghostPaths.url').api('db'), {
type: 'DELETE'
}).then(function () {
self.notifications.showSuccess('All content deleted from database.');
}).catch(function (response) {
self.notifications.showErrors(response);
});
},
confirmReject: function () {
return false;
}
},
confirm: {
accept: {
text: 'Delete',
buttonClass: 'button-delete'
},
reject: {
text: 'Cancel',
buttonClass: 'button'
}
}
});
export default DeleteAllController;