mirror of
https://github.com/discourse/discourse.git
synced 2025-02-10 13:36:31 +08:00
21 lines
438 B
JavaScript
21 lines
438 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.get("model");
|
|
|
|
group
|
|
.create()
|
|
.then(() => {
|
|
this.transitionToRoute("group.members", group.name);
|
|
})
|
|
.catch(popupAjaxError)
|
|
.finally(() => this.set("saving", false));
|
|
}
|
|
}
|
|
});
|