feat: move job providers to DB and suppress job-search link when none enabled #36
Reference in New Issue
Block a user
Delete Branch "feature/job-providers-db-and-link-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Two linked changes to make job-search provider config DB-driven and the CTA link conditional.
Why
Changes
cvSearch.JobProviderstable (JobProviderEntity, migrationAddJobProviders) seeded with 3 disabled defaults: ejobs.ro, bestjobs.eu, linkedin.comCvSearchDbContextgainsJobProvidersDbSet with entity configurationJobTokenService.CreateTokenAsyncqueries DB for enabled providers; returnsnull(no token) when none are enabledJobTokenService.TriggerStartAsyncreads and snapshots enabled providers from DB (was from appsettings)IJobTokenService.CreateTokenAsync→Task<string?>;CreateJobSearchTokenResponse.TokenId→string?CvMatcherControllerguards link-building on non-nullTokenId— CTA is suppressed when all providers are disabledJobSearchSettings.Providerslist removed;JobProviderConfigDTO retained for session snapshot formatCvSearchJobTask.GetProvidersfallback simplified to return[]+ warning (snapshot always populated from DB)Testing
Enabled = 0)Risk Assessment
TokenIdon the response DTO is now nullable — callers must handle null (CvMatcherControllerupdated)JobSearch:Providersenv vars in docker-compose are now ignored — providers must be managed in DBAnyAsyncDB call per match request (negligible)Closes #35
string.Join("") produced no whitespace between inline-block spans, causing keywords to visually merge in email clients that collapse margins. Switched to string.Join(" ") and zeroed left margin on each badge so they wrap cleanly without a gap on the first item. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>