0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/controllers/modals/delete-all.js
Sebastian Gierlinger be45e6fcd0 Remove CSRF from client
no issue
- removed occurrences of csrf from client
2014-07-01 11:39:01 +02:00

32 lines
811 B
JavaScript

var DeleteAllController = Ember.Controller.extend({
actions: {
confirmAccept: function () {
var self = this;
ic.ajax.request(this.get('ghostPaths').apiUrl('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;