From 53ed40bfc311e994b6879feb1fa1c6d8d9d545b5 Mon Sep 17 00:00:00 2001 From: Rimian Perkins Date: Fri, 13 Dec 2019 12:29:34 +1100 Subject: [PATCH] fix api routes and eslint --- assets/javascripts/discourse/controllers/s-show.js.es6 | 3 +-- ...p.js.es6 => discourse-subscriptions-user-route-map.js.es6} | 0 config/routes.rb | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) rename assets/javascripts/discourse/{discourse-patrons-user-route-map.js.es6 => discourse-subscriptions-user-route-map.js.es6} (100%) diff --git a/assets/javascripts/discourse/controllers/s-show.js.es6 b/assets/javascripts/discourse/controllers/s-show.js.es6 index 0b8f25b..a00371d 100644 --- a/assets/javascripts/discourse/controllers/s-show.js.es6 +++ b/assets/javascripts/discourse/controllers/s-show.js.es6 @@ -2,7 +2,6 @@ import Customer from "discourse/plugins/discourse-subscriptions/discourse/models import Payment from "discourse/plugins/discourse-subscriptions/discourse/models/payment"; import Subscription from "discourse/plugins/discourse-subscriptions/discourse/models/subscription"; import computed from "discourse-common/utils/decorators"; -import { i18n } from "discourse/lib/computed"; export default Ember.Controller.extend({ planTypeIsSelected: true, @@ -14,7 +13,7 @@ export default Ember.Controller.extend({ @computed("type") buttonText(type) { - return I18n.t(`discourse_subscriptions.${this.get("type")}.payment_button`); + return I18n.t(`discourse_subscriptions.${type}.payment_button`); }, init() { diff --git a/assets/javascripts/discourse/discourse-patrons-user-route-map.js.es6 b/assets/javascripts/discourse/discourse-subscriptions-user-route-map.js.es6 similarity index 100% rename from assets/javascripts/discourse/discourse-patrons-user-route-map.js.es6 rename to assets/javascripts/discourse/discourse-subscriptions-user-route-map.js.es6 diff --git a/config/routes.rb b/config/routes.rb index b3091d2..e901a36 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -24,7 +24,5 @@ DiscourseSubscriptions::Engine.routes.draw do resources :products, only: [:index, :show] resources :subscriptions, only: [:create] - get '/' => 'patrons#index' - get '/subscribe' => 'patrons#index' - get '/subscribe/:id' => 'patrons#index' + get '/:id' => 'patrons#index' end