-
Notifications
You must be signed in to change notification settings - Fork 348
Subscription #423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Subscription #423
Conversation
brandonkachen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good for a first pass. but lots of LLM-slop here, particularly code patterns like this:
const customerId =
typeof stripeSubscription.customer === 'string'
? stripeSubscription.customer
: stripeSubscription.customer.id
we can instead add a generic function to do this:
export function resolveExpandableId<T extends { id: string }>(
value: string | T,
): string {
return typeof value === 'string' ? value : value.id
}
const customerId = resolveExpandableId(stripeSubscription.customer)
| @@ -1,7 +1,11 @@ | |||
| import { | |||
| grantOrganizationCredits, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this whole file feels messy; seems like codebuff is trying to shoehorn its conception of the code into the existing thing. we should have codex review and see if there's something better.
|
oh and please make sure to run the db migration locally once you're happy with the db schema, so we have all the artifact files that drizzle will apply on prod when you merge |
No description provided.