From ff3755f5fd67ce01779b2c627795e30021c74a04 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Mon, 25 Jun 2018 09:58:34 +0100 Subject: [PATCH] updating api location --- app/{pods/card/model.js => models/card.js} | 0 app/models/plan.js | 2 +- app/pods/components/plan-item/component.js | 6 +++--- app/pods/plans/payment/controller.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename app/{pods/card/model.js => models/card.js} (100%) diff --git a/app/pods/card/model.js b/app/models/card.js similarity index 100% rename from app/pods/card/model.js rename to app/models/card.js diff --git a/app/models/plan.js b/app/models/plan.js index ecaa51e..ac80136 100644 --- a/app/models/plan.js +++ b/app/models/plan.js @@ -7,7 +7,7 @@ export default DS.Model.extend({ stripePlan: DS.belongsTo('stripe-plan', { async: true }), - scopes: DS.hasMany('permission', { + permissions: DS.hasMany('permission', { async: true }), lowValue: attr('boolean'), diff --git a/app/pods/components/plan-item/component.js b/app/pods/components/plan-item/component.js index a53c6a7..2eb6893 100644 --- a/app/pods/components/plan-item/component.js +++ b/app/pods/components/plan-item/component.js @@ -3,10 +3,10 @@ import Component from '@ember/component'; export default Component.extend({ - classNames: ['frame', 'flex-auto', 'flex', 'flex-column'], + classNames: ['frame', 'flex-auto', 'flex', 'flex-column'], - scopes: computed('plan.scopes.@each.paidFor', function(){ - return this.get('plan.scopes').filter((scope) => { + scopes: computed('plan.permissions.@each.paidFor', function(){ + return this.get('plan.permissions').filter((scope) => { if(this.showPaidOnly){ return scope.get('paidFor'); } diff --git a/app/pods/plans/payment/controller.js b/app/pods/plans/payment/controller.js index c9876e0..691998c 100644 --- a/app/pods/plans/payment/controller.js +++ b/app/pods/plans/payment/controller.js @@ -27,7 +27,7 @@ export default Controller.extend({ return $.ajax({ method: 'POST', dataType: 'json', - url: `/api/stripePlans/subscribe`, + url: `/v1/stripe-plans/subscribe`, data: { stripePlanId: this.get('model.plan.stripePlan.id'), internalPlanId: this.get('model.plan.id'),