mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 17:11:17 +00:00
feat(backend): add WeatherService
Manage per-user WeatherSource instances via FeedSourceProvider, following the same pattern as LocationService. Wire into FeedEngineService so weather data is included in the feed. Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { initTRPC, TRPCError } from "@trpc/server"
|
||||
|
||||
import { createLocationRouter } from "../location/router.ts"
|
||||
import type { LocationService } from "../location/service.ts"
|
||||
import type { WeatherService } from "../weather/service.ts"
|
||||
import type { Context } from "./context.ts"
|
||||
|
||||
import { createLocationRouter } from "../location/router.ts"
|
||||
|
||||
interface AuthedContext {
|
||||
user: NonNullable<Context["user"]>
|
||||
session: NonNullable<Context["session"]>
|
||||
@@ -34,6 +36,7 @@ export type TRPC = ReturnType<typeof createTRPC>
|
||||
|
||||
export interface TRPCRouterDeps {
|
||||
locationService: LocationService
|
||||
weatherService: WeatherService
|
||||
}
|
||||
|
||||
export function createTRPCRouter({ locationService }: TRPCRouterDeps) {
|
||||
|
||||
Reference in New Issue
Block a user