Commit Graph

3 Commits

Author SHA1 Message Date
Flea Flicker 1e84823656 fix(calendar): address CTO review follow-up items
- Capture DTSTAMP once before loop instead of new Date() per event
- Return plain text 401 for auth errors (calendar clients can't parse JSON)
- Use encodeURIComponent for Content-Disposition filename

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-26 04:10:40 +00:00
Flea Flicker 8ca120d521 fix(calendar): address CTO review - N+1, Content-Disposition, SEQUENCE, sensitive leak
- Replace N+1 queries with single INNER JOIN across clients, pets, services
- Change Content-Disposition from attachment to inline for calendar auto-sync
- Add SEQUENCE:0 for confirmed, SEQUENCE:1 for cancelled events (RFC 5546)
- Fix sensitive field leak: return only {id, customerNotes, updatedAt}
- Add missing null-check guard after .returning() in portal.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 04:07:35 +00:00
Scrubs McBarkley 5b1a8858f3 feat: implement iCal calendar feed (GRO-107)
- Add icalToken column to staff table
- Add public calendar feed endpoint GET /api/calendar/:staffId.ics
- Add token management routes POST/DELETE /api/staff/:id/ical-token
- Hand-build iCal output (RFC 5545)
- Update staff factory with icalToken field

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-25 11:04:13 +00:00