From f012dc2407d4f4a300876b0a63af62a03ac13131 Mon Sep 17 00:00:00 2001 From: merefield Date: Sun, 24 Sep 2023 08:25:42 +0100 Subject: [PATCH] fix file inclusion --- assets/javascripts/discourse/services/subscription.js | 2 +- config/routes.rb | 2 +- plugin.rb | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/services/subscription.js b/assets/javascripts/discourse/services/subscription.js index a3cce291..6f2972d9 100644 --- a/assets/javascripts/discourse/services/subscription.js +++ b/assets/javascripts/discourse/services/subscription.js @@ -27,7 +27,7 @@ export default class SubscriptionService extends Service { } retrieveSubscriptionStatus() { - ajax("/admin/subscription").then(result => { + ajax("admin/wizards/subscription").then(result => { console.log(result) this.subscribed = result.subscribed; this.subscriptionType = result.subscription_type; diff --git a/config/routes.rb b/config/routes.rb index 8f865fec..b611916e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -14,7 +14,7 @@ Discourse::Application.routes.append do scope module: 'custom_wizard', constraints: AdminConstraint.new do get 'admin/wizards' => 'admin#index' - get 'admin/subscription' => 'subscription#index' + get 'admin/wizards/subscription' => 'subscription#index' get 'admin/wizards/wizard' => 'admin_wizard#index' get 'admin/wizards/wizard/create' => 'admin#index' diff --git a/plugin.rb b/plugin.rb index 6f2c6ccf..f50e1e8a 100644 --- a/plugin.rb +++ b/plugin.rb @@ -37,6 +37,7 @@ after_initialize do ../lib/custom_wizard/engine.rb ../config/routes.rb ../app/controllers/custom_wizard/admin/admin.rb + ../app/controllers/custom_wizard/admin/subscription.rb ../app/controllers/custom_wizard/admin/wizard.rb ../app/controllers/custom_wizard/admin/submissions.rb ../app/controllers/custom_wizard/admin/api.rb