feat(#22): Add todo comment and strong typing

This commit is contained in:
Josh Creek
2024-07-16 19:46:32 +01:00
parent ef3abfe396
commit 0539afb16e
+5 -2
View File
@@ -57,8 +57,11 @@ export const POST: RequestHandler = async ({ request }) => {
break;
case 'customer.created':
case 'customer.updated':
console.log(event.data.object);
await createOrRetrieveCustomer(event.data.object);
// TODO - this should be passing the supabase customer uuid not the stripe customer id
await createOrRetrieveCustomer({
email: (event.data.object as stripe.Customer).email!,
uuid: event.data.object.id
});
break;
case 'customer.subscription.created':
case 'customer.subscription.updated':