Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ export default class WizardSubscriptionStatus extends Component {

constructor() {
super(...arguments);
ajax(`${this.basePath}`)
ajax(`${this.basePath}?resource=discourse-custom-wizard`)
.then((result) => {
this.supplierId = result.suppliers[0].id;
this.authorized = result.suppliers[0].authorized;
if (result.suppliers && result.suppliers.length) {
this.supplierId = result.suppliers[0].id;
this.authorized = result.suppliers[0].authorized;
}
})
.finally(() => {
this.subscription.retrieveSubscriptionStatus();
Expand All @@ -41,8 +43,10 @@ export default class WizardSubscriptionStatus extends Component {
},
})
.then((result) => {
this.supplierId = result.supplier.id;
this.authorized = !(result.supplier.authorized_at === null);
if (result.success) {
this.supplierId = result.supplier_id;
this.authorized = false;
}
})
.finally(() => {
this.unauthorizing = false;
Expand Down
4 changes: 2 additions & 2 deletions plugin.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# frozen_string_literal: true
# name: discourse-custom-wizard
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
# version: 2.8.10
# version: 2.8.11
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
# url: https://github.com/paviliondev/discourse-custom-wizard
# contact_emails: [email protected]
# subscription_url: https://coop.pavilion.tech
# meta_topic_id: 73345

gem 'liquid', '5.5.0', require: true
gem "discourse_subscription_client", "0.1.2", require_name: "discourse_subscription_client"
gem "discourse_subscription_client", "0.1.6", require_name: "discourse_subscription_client"
gem 'discourse_plugin_statistics', '0.1.0.pre7', require: true
register_asset 'stylesheets/common/admin.scss'
register_asset 'stylesheets/common/wizard.scss'
Expand Down
Loading