fix(integrations): preserve Nextcloud subpaths

This commit is contained in:
Artur authored and ajnart committed 2026-09-06 11:05:57 +02:00
1 parent 35155b18b9
commit c6d22b3939
4 files changed
+73 -1

No files matched your search

@@ -0,0 +1,10 @@
export const createNextcloudCalendarServerUrl = (integrationUrl: string) => {
const calendarServerUrl = new URL(integrationUrl);
const integrationPath = calendarServerUrl.pathname.replace(/\/+$/, "");
calendarServerUrl.pathname = `${integrationPath}/remote.php/dav/`;
calendarServerUrl.search = "";
calendarServerUrl.hash = "";
return calendarServerUrl.toString();
};