0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00
Dieser Commit ist enthalten in:
merefield 2023-09-22 11:02:44 +01:00
Ursprung bcd6f86fc8
Commit 07bed7ec86

Datei anzeigen

@ -16,7 +16,7 @@ export default class WizardSubscriptionAuthorize extends Component {
constructor() { constructor() {
super(...arguments); super(...arguments);
ajax("/admin/plugins/subscription-client/suppliers?final_landing_path%3D%2Fadmin%2Fwizards%2Fwizard").then((result) => { ajax("/admin/plugins/subscription-client/suppliers").then((result) => {
this.supplierId = result.suppliers[0].id; this.supplierId = result.suppliers[0].id;
this.authorized = result.suppliers[0].authorized; this.authorized = result.suppliers[0].authorized;
}) })
@ -24,7 +24,8 @@ export default class WizardSubscriptionAuthorize extends Component {
@action @action
authorize() { authorize() {
window.location.href = `${this.basePath}/authorize?supplier_id=${this.supplierId}`; window.location.href = `${this.basePath}/authorize?supplier_id=${this.supplierId}&final_landing_path=/admin/wizards/wizard`;
//window.location.href = `${this.basePath}/authorize?supplier_id=${this.supplierId}&final_landing_path%3D%2Fadmin%2Fwizards%2Fwizard`;
} }
@action @action
@ -39,8 +40,8 @@ export default class WizardSubscriptionAuthorize extends Component {
}) })
.then((result) => { .then((result) => {
console.log(result); console.log(result);
this.supplierId = result.suppliers[0].id; this.supplierId = result.supplier.id;
this.authorized = result.suppliers[0].authorized; this.authorized = !(result.supplier.authorized_at === null);
}) })
.finally(() => { .finally(() => {
this.unauthorizing = false; this.unauthorizing = false;