mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-22 06:56:35 +00:00
ad312cdd43
days/ carried two fachlichkeiten with a full file set each: days.controller, days.service, days.mcp, days.rpc, days.dto next to the five day-notes ones. The note files move out unchanged; because the new directory sits at the same depth, not one import path inside them changed. The two modules deliberately do not reference each other in either direction: dayExists is raw SQL on the days table in the note service, and DaysService reads day_notes the same way, so a module edge would buy nothing and cost a cycle. DayNotesModule has to be registered in PluginsRuntimeModule as well as AppModule - DayNotesRpc owns four of the 113 wire methods and the registry boots with requireTotalCoverage, so leaving it out would stop every test app that assembles the plugin runtime. The days e2e container assembles both modules now: the note routes still nest under the days prefix, and a container that builds only DaysModule would 404 on them while production served them fine.
12 lines
612 B
TypeScript
12 lines
612 B
TypeScript
import { createZodDto } from 'nestjs-zod';
|
|
import { dayNoteCreateRequestSchema, dayNoteUpdateRequestSchema } from '@trek/shared';
|
|
|
|
/**
|
|
* Server-side createZodDto wrappers over the @trek/shared day-note contracts.
|
|
* The global ZodValidationPipe (APP_PIPE in app.module.ts) validates any
|
|
* @Body() parameter typed with one of these classes by metatype — the Zod
|
|
* schemas in shared/ remain the single source of truth for the wire contract.
|
|
*/
|
|
export class DayNoteCreateDto extends createZodDto(dayNoteCreateRequestSchema) {}
|
|
export class DayNoteUpdateDto extends createZodDto(dayNoteUpdateRequestSchema) {}
|