Skip to content

Commit

Permalink
feat: use paid payment status instead
Browse files Browse the repository at this point in the history
  • Loading branch information
aexshafii committed Nov 2, 2024
1 parent 3e48f46 commit 331e2c5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions web/drizzle/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,10 @@ export const checkUserSubscriptionStatus = async (userId: string) => {
if (!userUsage[0]) {
return false;
}
if (userUsage[0].subscriptionStatus === "active") {
return true;
}
if (userUsage[0].subscriptionStatus === "complete") {
if (userUsage[0].paymentStatus === "paid") {
return true;
}

return false;
} catch (error) {
console.error("Error checking subscription status for User ID:", userId);
Expand Down

0 comments on commit 331e2c5

Please sign in to comment.