Recalculate creators count on plan downgrade

This commit is contained in:
jvcalderon 2024-01-23 13:21:54 +01:00
parent c83a5219f6
commit 09b75c3924
2 changed files with 4 additions and 1 deletions

@ -1 +1 @@
Subproject commit 1d187da286d2006d26d47ed6212c6026b500cf66 Subproject commit 38e7b34a708bcaf6abc677be54b9d74bd8d18ea5

View File

@ -91,6 +91,9 @@ export async function getSelf(ctx: any) {
id: userId, id: userId,
} }
// Adjust creators quotas (prevents wrong creators count if user has changed the plan)
await groups.adjustGroupCreatorsQuotas()
// get the main body of the user // get the main body of the user
const user = await userSdk.db.getUser(userId) const user = await userSdk.db.getUser(userId)
ctx.body = await groups.enrichUserRolesFromGroups(user) ctx.body = await groups.enrichUserRolesFromGroups(user)