mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-24 11:01:16 +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:
@@ -32,10 +32,10 @@ function main() {
|
||||
}
|
||||
|
||||
const sessionManager = new UserSessionManager({
|
||||
db,
|
||||
providers: [
|
||||
new LocationSourceProvider(db),
|
||||
new LocationSourceProvider(),
|
||||
new WeatherSourceProvider({
|
||||
db,
|
||||
credentials: {
|
||||
privateKey: process.env.WEATHERKIT_PRIVATE_KEY!,
|
||||
keyId: process.env.WEATHERKIT_KEY_ID!,
|
||||
|
||||
Reference in New Issue
Block a user