Keep existing Nextcloud DAV endpoints intact

This commit is contained in:
arturict authored and ajnart committed 2026-09-06 11:05:57 +02:00
1 parent c6d22b3939
commit 1ed6b16217
2 files changed
+10 -1

No files matched your search

@@ -1,8 +1,11 @@
export const createNextcloudCalendarServerUrl = (integrationUrl: string) => {
const calendarServerUrl = new URL(integrationUrl);
const integrationPath = calendarServerUrl.pathname.replace(/\/+$/, "");
const davPath = "/remote.php/dav";
calendarServerUrl.pathname = `${integrationPath}/remote.php/dav/`;
calendarServerUrl.pathname = integrationPath.endsWith(davPath)
? `${integrationPath}/`
: `${integrationPath}${davPath}/`;
calendarServerUrl.search = "";
calendarServerUrl.hash = "";