This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/admin/controllers/admin-embedding.js.es6

19 lines
394 B
JavaScript

export default Ember.Controller.extend({
embedding: null,
actions: {
saveChanges() {
this.get('embedding').update({});
},
addHost() {
const host = this.store.createRecord('embeddable-host');
this.get('embedding.embeddable_hosts').pushObject(host);
},
deleteHost(host) {
this.get('embedding.embeddable_hosts').removeObject(host);
}
}
});