mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 19:52:27 +08:00
fix: adjust upstash api
This commit is contained in:
@@ -85,17 +85,21 @@ export function createUpstashClient(store: SyncStore) {
|
||||
};
|
||||
},
|
||||
path(path: string) {
|
||||
let url = config.endpoint;
|
||||
// let url = config.endpoint;
|
||||
|
||||
if (!url.endsWith("/")) {
|
||||
url += "/";
|
||||
if (!path.endsWith("/")) {
|
||||
path += "/";
|
||||
}
|
||||
|
||||
if (path.startsWith("/")) {
|
||||
path = path.slice(1);
|
||||
}
|
||||
|
||||
return url + path;
|
||||
let url = new URL("/api/" + path);
|
||||
|
||||
// add query params
|
||||
url.searchParams.append("endpoint", config.endpoint);
|
||||
|
||||
return url.toString();
|
||||
},
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user