mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-07-08 07:12:46 +00:00
fix api routes and eslint
This commit is contained in:
parent
4b334a69b5
commit
53ed40bfc3
@ -2,7 +2,6 @@ import Customer from "discourse/plugins/discourse-subscriptions/discourse/models
|
|||||||
import Payment from "discourse/plugins/discourse-subscriptions/discourse/models/payment";
|
import Payment from "discourse/plugins/discourse-subscriptions/discourse/models/payment";
|
||||||
import Subscription from "discourse/plugins/discourse-subscriptions/discourse/models/subscription";
|
import Subscription from "discourse/plugins/discourse-subscriptions/discourse/models/subscription";
|
||||||
import computed from "discourse-common/utils/decorators";
|
import computed from "discourse-common/utils/decorators";
|
||||||
import { i18n } from "discourse/lib/computed";
|
|
||||||
|
|
||||||
export default Ember.Controller.extend({
|
export default Ember.Controller.extend({
|
||||||
planTypeIsSelected: true,
|
planTypeIsSelected: true,
|
||||||
@ -14,7 +13,7 @@ export default Ember.Controller.extend({
|
|||||||
|
|
||||||
@computed("type")
|
@computed("type")
|
||||||
buttonText(type) {
|
buttonText(type) {
|
||||||
return I18n.t(`discourse_subscriptions.${this.get("type")}.payment_button`);
|
return I18n.t(`discourse_subscriptions.${type}.payment_button`);
|
||||||
},
|
},
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
@ -24,7 +24,5 @@ DiscourseSubscriptions::Engine.routes.draw do
|
|||||||
resources :products, only: [:index, :show]
|
resources :products, only: [:index, :show]
|
||||||
resources :subscriptions, only: [:create]
|
resources :subscriptions, only: [:create]
|
||||||
|
|
||||||
get '/' => 'patrons#index'
|
get '/:id' => 'patrons#index'
|
||||||
get '/subscribe' => 'patrons#index'
|
|
||||||
get '/subscribe/:id' => 'patrons#index'
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user