mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 00:56:26 +08:00
refactor(server): payment service (#8906)
This commit is contained in:
@@ -72,11 +72,13 @@ export class SubscriptionStore extends Store {
|
||||
const data = await this.gqlService.gql({
|
||||
query: resumeSubscriptionMutation,
|
||||
variables: {
|
||||
idempotencyKey,
|
||||
plan,
|
||||
},
|
||||
context: {
|
||||
signal: abortSignal,
|
||||
headers: {
|
||||
'Idempotency-Key': idempotencyKey,
|
||||
},
|
||||
},
|
||||
});
|
||||
return data.resumeSubscription;
|
||||
@@ -90,11 +92,13 @@ export class SubscriptionStore extends Store {
|
||||
const data = await this.gqlService.gql({
|
||||
query: cancelSubscriptionMutation,
|
||||
variables: {
|
||||
idempotencyKey,
|
||||
plan,
|
||||
},
|
||||
context: {
|
||||
signal: abortSignal,
|
||||
headers: {
|
||||
'Idempotency-Key': idempotencyKey,
|
||||
},
|
||||
},
|
||||
});
|
||||
return data.cancelSubscription;
|
||||
@@ -118,10 +122,14 @@ export class SubscriptionStore extends Store {
|
||||
return this.gqlService.gql({
|
||||
query: updateSubscriptionMutation,
|
||||
variables: {
|
||||
idempotencyKey,
|
||||
plan,
|
||||
recurring,
|
||||
},
|
||||
context: {
|
||||
headers: {
|
||||
'Idempotency-Key': idempotencyKey,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user