-
Notifications
You must be signed in to change notification settings - Fork 207
Mana shop #3625
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?
Conversation
IanPhilips
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.
This is exciting! It looks pretty good overall, but I've got some changes I'd like made.
With all the hooks, can you make something more generic like usePersistentAPIGetter and then have a custom hook that uses the refresh every 5 mins? And for the ones that are for every user avatar/comment, which will be dozens on many pages, ideally that would use a new usePersistentBatchedGetter like the current useBatchedGetter but with persistent storage.
We don't use vercel handlers anymore, so would like those to be normal api endpoints instead.
Thanks for getting this far!
| ) | ||
| } | ||
|
|
||
| const apiKey = process.env.PRINTFUL_KEY |
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.
I don't see this new key in common/src/secrets.ts - doesn't look like it's on https://console.cloud.google.com/security/secret-manager?referrer=search&hl=en&project=mantic-markets either
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.
It's stored in Vercel env keys
| const targetId = userId ?? auth?.uid | ||
| if (!targetId) throw new APIError(400, 'userId is required') | ||
| const pg = createSupabaseDirectClient() | ||
| const row = await pg.oneOrNone<{ sum: string }>( |
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.
why isn't this just a check in the entitlements table?
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.
It's computing lifetime spend towards the badge, not just current possession.
No description provided.