Merge branch 'ChatGPTNextWeb:main' into main

This commit is contained in:
Hk-Gosuto
2024-04-12 18:04:09 +08:00
committed by GitHub
3 changed files with 23 additions and 11 deletions

View File

@@ -63,9 +63,9 @@ export function createWebDavClient(store: SyncStore) {
};
},
path(path: string, proxyUrl: string = "") {
if (!path.endsWith("/")) {
path += "/";
}
// if (!path.endsWith("/")) {
// path += "/";
// }
if (path.startsWith("/")) {
path = path.slice(1);
}
@@ -76,7 +76,7 @@ export function createWebDavClient(store: SyncStore) {
let url;
if (proxyUrl.length > 0 || proxyUrl === "/") {
let u = new URL(proxyUrl + "/api/webdav/" + path);
let u = new URL(proxyUrl + "api/webdav/" + path);
// add query params
u.searchParams.append("endpoint", config.endpoint);
url = u.toString();