mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-24 02:51:17 +00:00
feat(session): query enabled sources before providers (#85)
UserSessionManager now queries the user_sources table for enabled sources before calling any provider. Providers receive the per-user JSON config directly instead of querying the DB themselves, removing their db dependency and eliminating redundant round-trips. Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -51,7 +51,6 @@ async function handleUpdateProviderConfig(c: Context<Env>) {
|
||||
}
|
||||
|
||||
const sessionManager = c.get("sessionManager")
|
||||
const db = c.get("db")
|
||||
|
||||
let body: unknown
|
||||
try {
|
||||
@@ -68,7 +67,6 @@ async function handleUpdateProviderConfig(c: Context<Env>) {
|
||||
}
|
||||
|
||||
const updated = new WeatherSourceProvider({
|
||||
db,
|
||||
credentials: parsed.credentials,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user