mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
FIX: Can't add categories when creating a new web hook.
This commit is contained in:
@ -65,10 +65,16 @@ export default Ember.Controller.extend({
|
||||
this.set('saved', false);
|
||||
const url = extractDomainFromUrl(this.get('model.payload_url'));
|
||||
const model = this.get('model');
|
||||
const isNew = model.get('isNew');
|
||||
|
||||
const saveWebHook = () => {
|
||||
return model.save().then(() => {
|
||||
this.set('saved', true);
|
||||
this.get('adminWebHooks').get('model').addObject(model);
|
||||
|
||||
if (isNew) {
|
||||
this.transitionToRoute('adminWebHooks.show', model.get('id'));
|
||||
}
|
||||
}).catch(popupAjaxError);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user