Skip to content

Commit

Permalink
Update actions.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
vincanger committed Apr 12, 2024
1 parent 0631f9c commit ed0b701
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/server/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ export const stripePayment: StripePayment<string, StripePaymentResult> = async (
customerId: customer.id,
mode: tier === TierIds.CREDITS ? 'payment' : 'subscription',
});
console.log('session >>> ', session)
} catch (error: any) {
const statusCode = error.statusCode || 500;
const errorMessage = error.message || 'Internal server error';
throw new HttpError(statusCode, errorMessage);
}

await context.entities.User.update({
const updatedUser = await context.entities.User.update({
where: {
id: context.user.id,
},
Expand All @@ -76,6 +77,8 @@ export const stripePayment: StripePayment<string, StripePaymentResult> = async (
},
});

console.log('updatedUser >>> ', updatedUser)

return {
sessionUrl: session.url,
sessionId: session.id,
Expand Down

0 comments on commit ed0b701

Please sign in to comment.