feat(backend): add admin API with provider config endpoint (#83)

* feat(backend): add admin API with provider config endpoint

Add /api/admin/* route group with admin role middleware and a
PUT /api/admin/:sourceId/config endpoint for updating feed source
provider config at runtime. Currently supports aelis.weather.

Co-authored-by: Ona <no-reply@ona.com>

* test: remove weak active session test

Co-authored-by: Ona <no-reply@ona.com>

---------

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-03-21 19:01:43 +00:00
committed by GitHub
parent 0095d9cd72
commit 7862a6d367
6 changed files with 381 additions and 0 deletions

View File

@@ -23,6 +23,10 @@ export class UserSessionManager {
this.feedEnhancer = config.feedEnhancer ?? null
}
getProvider(sourceId: string): FeedSourceProvider | undefined {
return this.providers.get(sourceId)
}
async getOrCreate(userId: string): Promise<UserSession> {
const existing = this.sessions.get(userId)
if (existing) return existing.session