2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-07 12:02:53 +08:00

FEATURE: Webhooks.

This commit is contained in:
Erick Guan 2016-06-15 19:49:57 +02:00 committed by Guo Xiang Tan
parent 1f70fc9e11
commit 9ce61b4586
58 changed files with 1582 additions and 38 deletions

View file

@ -0,0 +1,19 @@
import { popupAjaxError } from 'discourse/lib/ajax-error';
export default Ember.Controller.extend({
actions: {
destroy(webhook) {
return bootbox.confirm(I18n.t('admin.web_hooks.delete_confirm'), I18n.t('no_value'), I18n.t('yes_value'), result => {
if (result) {
webhook.destroyRecord().then(() => {
this.get('model').removeObject(webhook);
}).catch(popupAjaxError);
}
});
},
loadMore() {
this.get('model').loadMore();
}
}
});