0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Removed usage of hasActiveStripeSubscriptions API ()

refs https://github.com/TryGhost/Team/issues/1147

This endpoint is deprecated
This commit is contained in:
Fabien 'egg' O'Carroll 2022-05-04 17:24:56 +01:00 committed by GitHub
parent 983d37253a
commit fe4d2aeb9c
2 changed files with 4 additions and 4 deletions
ghost/admin/app/components

View file

@ -109,10 +109,10 @@ export default class GhLaunchWizardConnectStripeComponent extends Component {
*openDisconnectStripeConnectModalTask() {
this.hasActiveStripeSubscriptions = false;
const url = this.ghostPaths.url.api('/members/hasActiveStripeSubscriptions');
const url = this.ghostPaths.url.api('/members/') + '?filter=status:paid&limit=0';
const response = yield this.ajax.request(url);
if (response.hasActiveStripeSubscriptions) {
if (response?.meta?.pagination?.total !== 0) {
this.hasActiveStripeSubscriptions = true;
return;
}

View file

@ -213,10 +213,10 @@ export default Component.extend({
if (!this.stripeConnectAccountId) {
return;
}
const url = this.get('ghostPaths.url').api('/members/hasActiveStripeSubscriptions');
const url = this.ghostPaths.url.api('/members/') + '?filter=status:paid&limit=0';
const response = yield this.ajax.request(url);
if (response.hasActiveStripeSubscriptions) {
if (response?.meta?.pagination?.total !== 0) {
this.set('hasActiveStripeSubscriptions', true);
return;
}