(communityId: string)
| 26 | } |
| 27 | |
| 28 | async function downgradeAccount(communityId: string) { |
| 29 | return prisma.accounts.update({ |
| 30 | where: { id: communityId }, |
| 31 | data: { |
| 32 | premium: false, |
| 33 | }, |
| 34 | }); |
| 35 | } |
| 36 | |
| 37 | async function getCommunityId(event: any) { |
| 38 | const { customer: customerId } = event.data.object as any; |