save the product
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
export default Ember.Controller.extend({
|
||||
actions: {
|
||||
createPlan() {
|
||||
this.get("model")
|
||||
this.get("model.plan")
|
||||
.save()
|
||||
.then(() => {
|
||||
this.transitionToRoute("adminPlugins.discourse-patrons.plans");
|
||||
|
||||
+9
@@ -17,6 +17,15 @@ export default Ember.Controller.extend({
|
||||
this.transitionToRoute("adminPlugins.discourse-patrons.products");
|
||||
})
|
||||
.catch(popupAjaxError);
|
||||
},
|
||||
|
||||
updateProduct() {
|
||||
this.get("model.product")
|
||||
.update()
|
||||
.then(() => {
|
||||
this.transitionToRoute("adminPlugins.discourse-patrons.products");
|
||||
})
|
||||
.catch(popupAjaxError);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user