Skip to content

Disable premium price check when running in development mode#226

Merged
jonyTF merged 6 commits intoschej-it:mainfrom
maxwellward:disable-premium-price-check-in-dev
Mar 27, 2026
Merged

Disable premium price check when running in development mode#226
jonyTF merged 6 commits intoschej-it:mainfrom
maxwellward:disable-premium-price-check-in-dev

Conversation

@maxwellward
Copy link
Copy Markdown
Contributor

Adds a simple check to disable the Stripe API price check when in development mode. Avoids a 500 error when doing local dev as Stripe API isn't accessible

@wslany
Copy link
Copy Markdown
Contributor

wslany commented Mar 24, 2026

This would be useful for local development.

I think there is one issue though: returning early from init() in development leaves all of the price objects null, but the Premium CTA still appears clickable. The button state is keyed off loadingCheckoutUrl[v2ActivePrice?.id], so with v2ActivePrice === null it does not become disabled. Clicking it then calls handleUpgrade(v2ActivePrice), and that later reads price.id, which looks like it would throw.

Maybe either disable the upgrade actions entirely when price loading is skipped in development, or provide mock price data for dev mode? Should make it safer.

@maxwellward
Copy link
Copy Markdown
Contributor Author

Good spot. I think mock price data would be better as it would avoid disabling UI features in dev mode. Will get to that when I have time, hopefully this evening!

@wslany
Copy link
Copy Markdown
Contributor

wslany commented Mar 25, 2026

@maxwellward The frontend mock-price fix looks good, but I think the new change in createEvent introduces a regression: ownerId is being set to primitive.NilObjectID unconditionally after the signed-in branch, so authenticated users would create ownerless events.

@wslany
Copy link
Copy Markdown
Contributor

wslany commented Mar 25, 2026

@jonyTF Looks good to me.

@jonyTF jonyTF merged commit fd8931a into schej-it:main Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants