mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-24 19:01:17 +00:00
feat(backend): add PATCH /api/sources/:sourceId (#86)
Add endpoint for users to update their source config and enabled state. Config is deep-merged with existing values via lodash.merge and validated against the provider's schema before persisting. Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import { createLlmClient } from "./enhancement/llm-client.ts"
|
||||
import { registerLocationHttpHandlers } from "./location/http.ts"
|
||||
import { LocationSourceProvider } from "./location/provider.ts"
|
||||
import { UserSessionManager } from "./session/index.ts"
|
||||
import { registerSourcesHttpHandlers } from "./sources/http.ts"
|
||||
import { WeatherSourceProvider } from "./weather/provider.ts"
|
||||
|
||||
function main() {
|
||||
@@ -61,6 +62,7 @@ function main() {
|
||||
authSessionMiddleware,
|
||||
})
|
||||
registerLocationHttpHandlers(app, { sessionManager, authSessionMiddleware })
|
||||
registerSourcesHttpHandlers(app, { sessionManager, authSessionMiddleware })
|
||||
registerAdminHttpHandlers(app, { sessionManager, adminMiddleware, db })
|
||||
|
||||
process.on("SIGTERM", async () => {
|
||||
|
||||
Reference in New Issue
Block a user