Add CalDav routes and methods, with mock data
This commit is contained in:
@@ -18,6 +18,9 @@ interface DavResponse {
|
||||
'card:addressbook-home-set'?: {
|
||||
'd:href': string;
|
||||
};
|
||||
'cal:calendar-home-set'?: {
|
||||
'd:href': string;
|
||||
};
|
||||
'd:current-user-principal'?: {
|
||||
'd:href': string;
|
||||
};
|
||||
@@ -109,6 +112,12 @@ export const handler: Handler<Data, FreshContextState> = async (request, context
|
||||
};
|
||||
}
|
||||
|
||||
if (requestBody.includes('calendar-home-set')) {
|
||||
propResponse['d:propstat']['d:prop']['cal:calendar-home-set'] = {
|
||||
'd:href': `/dav/calendars/`,
|
||||
};
|
||||
}
|
||||
|
||||
responseBody['d:multistatus']['d:response'].push(propResponse);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user