feat(03-09): rename eventFieldsSchema to canonical title/start/end contract (CR-01)
- Replace summary→title, dtstart→start, dtend→end in eventFieldsSchema - Server now accepts exact CreateEventPayload shape the PWA sends - Update existing write tests to use new canonical field names - No internal rename map; one canonical name set end-to-end - grep confirms no summary/dtstart/dtend in eventFieldsSchema
This commit is contained in:
@@ -289,10 +289,10 @@ describe('POST /api/events/create', () => {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
summary: 'New event',
|
||||
title: 'New event',
|
||||
allDay: false,
|
||||
dtstart: '2026-06-15T10:00:00Z',
|
||||
dtend: '2026-06-15T11:00:00Z',
|
||||
start: '2026-06-15T10:00:00Z',
|
||||
end: '2026-06-15T11:00:00Z',
|
||||
calendarUrl: 'https://caldav.fastmail.com/dav/calendars/user/test@fm.com/Default/',
|
||||
}),
|
||||
})
|
||||
@@ -324,10 +324,10 @@ describe('POST /api/events/create', () => {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
summary: 'Unauthorized write',
|
||||
title: 'Unauthorized write',
|
||||
allDay: false,
|
||||
dtstart: '2026-06-15T10:00:00Z',
|
||||
dtend: '2026-06-15T11:00:00Z',
|
||||
start: '2026-06-15T10:00:00Z',
|
||||
end: '2026-06-15T11:00:00Z',
|
||||
calendarUrl: 'https://caldav.fastmail.com/dav/calendars/user/other@fm.com/Personal/',
|
||||
}),
|
||||
})
|
||||
@@ -363,10 +363,10 @@ describe('PATCH /api/events/:uid/edit', () => {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
summary: 'Updated title',
|
||||
title: 'Updated title',
|
||||
allDay: false,
|
||||
dtstart: '2026-06-15T10:00:00Z',
|
||||
dtend: '2026-06-15T11:00:00Z',
|
||||
start: '2026-06-15T10:00:00Z',
|
||||
end: '2026-06-15T11:00:00Z',
|
||||
calendarUrl: 'https://caldav.fastmail.com/dav/calendars/user/test@fm.com/Default/',
|
||||
}),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user