mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-22 14:51:45 +00:00
0257e4e71e
First strangler migration (L1): /api/weather is served by a NestJS module.
- @trek/shared/weather Zod contract; Nest controller byte-identical to the legacy Express route (paths, query params, status codes, { error } bodies, lang default, ApiError/500 passthrough). Service reuses getWeather/getDetailedWeather (+ shared cache; MCP tools unchanged).
- Strangler routes /api/weather to Nest by default; the legacy Express route + its migration-time parity test were decommissioned in this PR.
- Frontend (FE2): weatherApi typed against the @trek/shared WeatherResult contract.
- Harness: reusable Nest-vs-Express parity harness, e2e harness (temp SQLite + seed/cookie helpers, real JwtAuthGuard), src/nest coverage gate raised to >=80%, src/nest test guide.
- Verified end-to-end on a prod mirror (dev1): 401/400/200 via Nest with real Open-Meteo data, Express route gone.
11 lines
330 B
TypeScript
11 lines
330 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { WeatherController } from './weather.controller';
|
|
import { WeatherService } from './weather.service';
|
|
|
|
/** Weather domain (pilot leaf module). Registered in AppModule. */
|
|
@Module({
|
|
controllers: [WeatherController],
|
|
providers: [WeatherService],
|
|
})
|
|
export class WeatherModule {}
|