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/discourse/controllers/groups-new.js.es6
2019-05-27 10:15:39 +02:00

21 lines
431 B
JavaScript

import { popupAjaxError } from "discourse/lib/ajax-error";
export default Ember.Controller.extend({
saving: null,
actions: {
save() {
this.set("saving", true);
const group = this.model;
group
.create()
.then(() => {
this.transitionToRoute("group.members", group.name);
})
.catch(popupAjaxError)
.finally(() => this.set("saving", false));
}
}
});