2019-10-08 00:55:38 -04:00
|
|
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
|
|
|
|
2019-09-24 01:20:07 -04:00
|
|
|
export default Ember.Controller.extend({
|
|
|
|
actions: {
|
|
|
|
createPlan() {
|
2019-09-24 06:44:51 -04:00
|
|
|
this.get("model")
|
|
|
|
.save()
|
|
|
|
.then(() => {
|
|
|
|
this.transitionToRoute("adminPlugins.discourse-patrons.plans");
|
2019-10-08 00:55:38 -04:00
|
|
|
})
|
|
|
|
.catch(popupAjaxError);
|
2019-09-24 01:20:07 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|