File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
assets/javascripts/discourse/components Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,12 @@ export default class WizardSubscriptionStatus extends Component {
1515
1616 constructor ( ) {
1717 super ( ...arguments ) ;
18- ajax ( `${ this . basePath } ` )
18+ ajax ( `${ this . basePath } ?resource=discourse-custom-wizard ` )
1919 . then ( ( result ) => {
20- this . supplierId = result . suppliers [ 0 ] . id ;
21- this . authorized = result . suppliers [ 0 ] . authorized ;
20+ if ( result . suppliers && result . suppliers . length ) {
21+ this . supplierId = result . suppliers [ 0 ] . id ;
22+ this . authorized = result . suppliers [ 0 ] . authorized ;
23+ }
2224 } )
2325 . finally ( ( ) => {
2426 this . subscription . retrieveSubscriptionStatus ( ) ;
@@ -41,8 +43,10 @@ export default class WizardSubscriptionStatus extends Component {
4143 } ,
4244 } )
4345 . then ( ( result ) => {
44- this . supplierId = result . supplier . id ;
45- this . authorized = ! ( result . supplier . authorized_at === null ) ;
46+ if ( result . success ) {
47+ this . supplierId = result . supplier_id ;
48+ this . authorized = false ;
49+ }
4650 } )
4751 . finally ( ( ) => {
4852 this . unauthorizing = false ;
Original file line number Diff line number Diff line change 99# meta_topic_id: 73345
1010
1111gem 'liquid' , '5.5.0' , require : true
12- gem "discourse_subscription_client" , "0.1.2 " , require_name : "discourse_subscription_client"
12+ gem "discourse_subscription_client" , "0.1.6 " , require_name : "discourse_subscription_client"
1313gem 'discourse_plugin_statistics' , '0.1.0.pre7' , require : true
1414register_asset 'stylesheets/common/admin.scss'
1515register_asset 'stylesheets/common/wizard.scss'
You can’t perform that action at this time.
0 commit comments