0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-19 23:31:11 +02:00

try alternative subscription update

Dieser Commit ist enthalten in:
merefield 2023-10-09 14:02:07 +01:00
Ursprung 2b867ce678
Commit 06e5b4baae
2 geänderte Dateien mit 19 neuen und 19 gelöschten Zeilen

Datei anzeigen

@ -39,23 +39,24 @@ export default class WizardSubscriptionBadge extends Component {
@action @action
update() { update() {
this.updating = true; this.subscription.retrieveSubscriptionStatus();
return ajax(`${this.basePath}/subscriptions`, { // this.updating = true;
type: "POST", // return ajax(`${this.basePath}/subscriptions`, {
}) // type: "POST",
.then(() => { // })
if (this.subscription.subscribed) { // .then(() => {
this.updateIcon = "check"; // if (this.subscription.subscribed) {
} else { // this.updateIcon = "check";
this.updateIcon = "times"; // } else {
} // this.updateIcon = "times";
}) // }
.catch(popupAjaxError) // })
.finally(() => { // .catch(popupAjaxError)
this.updating = false; // .finally(() => {
// this.updating = false;
// setTimeout(() => { // setTimeout(() => {
// this.updateIcon = null; // this.updateIcon = null;
// }, 7000); // }, 7000);
}); // });
} }
} }

Datei anzeigen

@ -47,7 +47,6 @@ export default class WizardSubscriptionStatus extends Component {
.finally(() => { .finally(() => {
this.unauthorizing = false; this.unauthorizing = false;
this.subscription.retrieveSubscriptionStatus(); this.subscription.retrieveSubscriptionStatus();
//window.location.reload();
}) })
.catch(popupAjaxError); .catch(popupAjaxError);
} }