mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 12:51:41 -05:00
20 lines
514 B
Text
20 lines
514 B
Text
|
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();
|
||
|
}
|
||
|
}
|
||
|
});
|