Skip to content

Commit

Permalink
Fix subscription status check for gifted pro users
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunkomath committed Jan 2, 2025
1 parent c4bbb85 commit 41b1465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/web/utils/useDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const getUserById = async (user_id: string): Promise<IUser> => {

return {
...user,
has_active_subscription: user.pro_gifted ?? ["trialing", "active"].includes(
has_active_subscription: user.pro_gifted ? true : ["trialing", "active"].includes(
(user?.stripe_subscription as unknown as Stripe.Subscription)?.status
),
} as unknown as IUser;
Expand Down

0 comments on commit 41b1465

Please sign in to comment.