Sent campaigns were editable and PATCH bodies were not validated #12

Closed
opened 2026-10-14 23:16:25 -04:00 by vmanne-poc · 0 comments
Owner

Problem:

  • Sent campaigns could still be edited.
  • PATCH bodies for campaigns and templates were typed as Partial<Dto>, which TypeScript erases at runtime, so the ValidationPipe skipped them.

Fix: only DRAFT/SCHEDULED campaigns can be edited or scheduled; explicit UpdateCampaignDto / UpdateTemplateDto classes are validated.

Tests: e2e "validates campaign updates" (non-string subject -> 400) and "refuses to ... edit a campaign that was already sent".

Fixed in v0.7.0.

**Problem:** - Sent campaigns could still be edited. - PATCH bodies for campaigns and templates were typed as `Partial<Dto>`, which TypeScript erases at runtime, so the ValidationPipe skipped them. **Fix:** only DRAFT/SCHEDULED campaigns can be edited or scheduled; explicit `UpdateCampaignDto` / `UpdateTemplateDto` classes are validated. **Tests:** e2e "validates campaign updates" (non-string subject -> 400) and "refuses to ... edit a campaign that was already sent". Fixed in `v0.7.0`.
vmanne-poc 2026-10-14 23:16:25 -04:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
vmanne-poc/Postak#12
No description provided.