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
2020-03-12 13:29:55 -04:00

22 lines
469 B
JavaScript

import Controller from "@ember/controller";
import { popupAjaxError } from "discourse/lib/ajax-error";
export default 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));
}
}
});