diff --git a/app/controllers/patrons_controller.rb b/app/controllers/patrons_controller.rb index 0f2f42a..03e5890 100644 --- a/app/controllers/patrons_controller.rb +++ b/app/controllers/patrons_controller.rb @@ -17,18 +17,6 @@ module DiscoursePatrons render json: result end - def show - payment_intent = ::Stripe::PaymentIntent.retrieve(params[:pid]) - - if current_user && (current_user.admin || payment_intent[:customer] == current_user.id) - result = payment_intent - else - result = { error: 'Not found' } - end - - render json: result - end - def create begin diff --git a/assets/javascripts/discourse/controllers/patrons-show.js.es6 b/assets/javascripts/discourse/controllers/patrons-show.js.es6 deleted file mode 100644 index f75f4a7..0000000 --- a/assets/javascripts/discourse/controllers/patrons-show.js.es6 +++ /dev/null @@ -1,9 +0,0 @@ -import DiscourseURL from "discourse/lib/url"; - -export default Ember.Controller.extend({ - actions: { - goBack() { - return DiscourseURL.redirectTo("/patrons"); - } - } -}); diff --git a/assets/javascripts/discourse/patrons-route-map.js.es6 b/assets/javascripts/discourse/patrons-route-map.js.es6 index 160d1b8..2969cda 100644 --- a/assets/javascripts/discourse/patrons-route-map.js.es6 +++ b/assets/javascripts/discourse/patrons-route-map.js.es6 @@ -1,8 +1,5 @@ export default function() { this.route("patrons", function() { - this.route("subscribe", function() { - this.route("product", { path: ":product_id" }) - }); - this.route("show", { path: ":pid" }); + this.route("subscribe"); }); } diff --git a/assets/javascripts/discourse/routes/patrons-show.js.es6 b/assets/javascripts/discourse/routes/patrons-show.js.es6 deleted file mode 100644 index 36794bb..0000000 --- a/assets/javascripts/discourse/routes/patrons-show.js.es6 +++ /dev/null @@ -1,7 +0,0 @@ -import { ajax } from "discourse/lib/ajax"; - -export default Discourse.Route.extend({ - model(params) { - return ajax(`/patrons/${params.pid}`, { method: "get" }); - } -}); diff --git a/assets/javascripts/discourse/templates/patrons/show.hbs b/assets/javascripts/discourse/templates/patrons/show.hbs deleted file mode 100644 index 96632be..0000000 --- a/assets/javascripts/discourse/templates/patrons/show.hbs +++ /dev/null @@ -1,19 +0,0 @@ - -{{#unless model.error}} -
- {{cook-text siteSettings.discourse_patrons_success_page}} -
- -{{i18n 'discourse_patrons.payment_intent_id'}} | -{{model.id}} | -
{{i18n 'discourse_patrons.amount'}} | -{{model.amount}} | -