mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat: check quota correctly (#6561)
This commit is contained in:
@@ -527,7 +527,10 @@ export class SubscriptionService {
|
||||
nextBillAt = new Date(subscription.current_period_end * 1000);
|
||||
}
|
||||
} else {
|
||||
this.event.emit('user.subscription.canceled', user.id);
|
||||
this.event.emit('user.subscription.canceled', {
|
||||
userId: user.id,
|
||||
plan,
|
||||
});
|
||||
}
|
||||
|
||||
const commonData = {
|
||||
|
||||
@@ -53,7 +53,10 @@ declare module '../../fundamentals/event/def' {
|
||||
userId: User['id'];
|
||||
plan: SubscriptionPlan;
|
||||
}>;
|
||||
canceled: Payload<User['id']>;
|
||||
canceled: Payload<{
|
||||
userId: User['id'];
|
||||
plan: SubscriptionPlan;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user