mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 10:44:23 +00:00
fix(server): fix the quirks preserved by the day DI migration
This commit is contained in:
@@ -108,7 +108,10 @@ export class DaysController {
|
||||
if (!current) {
|
||||
throw new HttpException({ error: 'Day not found' }, 404);
|
||||
}
|
||||
const day = this.days.update(id, current as never, { notes: body.notes, title: body.title });
|
||||
// The zod-parsed body carries only the keys the client actually sent, so
|
||||
// the service's presence sentinels preserve the omitted column (the client
|
||||
// updates notes and title in separate requests).
|
||||
const day = this.days.update(id, current as never, body);
|
||||
this.days.broadcast(tripId, 'day:updated', { day }, socketId);
|
||||
return { day };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user