diff --git a/src/app/(account)/settings/page.tsx b/src/app/(account)/settings/page.tsx index 2b610b44..872320c1 100644 --- a/src/app/(account)/settings/page.tsx +++ b/src/app/(account)/settings/page.tsx @@ -43,6 +43,10 @@ const verifyMembershipPayment = async (clerkId: string) => { .update(memberTable) .set({ membershipExpiresAt: expiryDate }) .where(eq(memberTable.id, clerkId)); + + // Delete key from Redis since it is no longer needed + await redisClient.del(`payment:membership:${clerkId}`); + return { paid: true as const, membershipExpiresAt: expiryDate }; }; export type MembershipPayment = Awaited>;