Create Plans
* rescue and respond to error from stripe * save plan name and id
This commit is contained in:
+1
@@ -1,5 +1,6 @@
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import computed from "ember-addons/ember-computed-decorators";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
@computed("model.plans")
|
||||
|
||||
+4
-1
@@ -1,3 +1,5 @@
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
actions: {
|
||||
createPlan() {
|
||||
@@ -5,7 +7,8 @@ export default Ember.Controller.extend({
|
||||
.save()
|
||||
.then(() => {
|
||||
this.transitionToRoute("adminPlugins.discourse-patrons.plans");
|
||||
});
|
||||
})
|
||||
.catch(popupAjaxError);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user