feat: Phase B — migrate sponsor + distribution routes to getConfig()#609
Merged
codercatdev merged 7 commits intodevfrom Mar 5, 2026
Merged
feat: Phase B — migrate sponsor + distribution routes to getConfig()#609codercatdev merged 7 commits intodevfrom
codercatdev merged 7 commits intodevfrom
Conversation
- sponsor-outreach: cooldownDays, maxOutreachPerRun from sponsor_config - gemini-outreach: geminiModel from pipeline_config, rate card from caller - sanity-distribute: pass distribution config to notifySubscribers - resend-notify: accept fromEmail + notificationEmails params Co-authored-by: content <content@miriad.systems>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Revert sponsor-outreach, sanity-distribute, resend-notify, gemini-outreach back to dev state. These belong to @content's Phase B scope.
Co-authored-by: content <content@miriad.systems>
- sponsor-outreach: cooldownDays, maxOutreachPerRun, rateCardTiers from sponsor_config - gemini-outreach: geminiModel from pipeline_config, renamed RATE_CARD to DEFAULT_RATE_CARD - resend-notify: accept optional fromEmail + notificationEmails params (backward compatible) Keeps all API keys and auth secrets as process.env.
- Fetch distribution_config singleton at start of runDistribution() - Pass resendFromEmail + notificationEmails to notifySubscribers()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase B: Migrate sponsor + distribution routes to getConfig()
Replaces hardcoded constants and
process.envconfig values withgetConfig()/getConfigValue()from the Sanity config singletons.Changes (4 files)
app/api/cron/sponsor-outreach/route.tscooldownDays,maxOutreachPerRun,rateCardTiersfromsponsor_configlib/sponsor/gemini-outreach.tsgeminiModelfrompipeline_config(wasprocess.env.GEMINI_MODEL)app/api/webhooks/sanity-distribute/route.tsresendFromEmail,notificationEmailsfromdistribution_configlib/resend-notify.tsfromEmail+notificationEmailsparams (backward compatible)What stays as
process.envGEMINI_API_KEY,RESEND_API_KEYCRON_SECRET,SANITY_WEBHOOK_SECRETNEXT_PUBLIC_URLTransition safety
getConfigValue()used with fallback defaults — if Sanity singleton doesn't exist yet, routes still workresend-notify.tsparams are optional — existing callers without new params use sensible defaultssponsorCfg.rateCardTierswithDEFAULT_RATE_CARDfallback