mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 22:12:33 +08:00
update
This commit is contained in:
@@ -293,9 +293,7 @@ export function fetch(
|
||||
options?: Record<string, unknown>,
|
||||
): Promise<any> {
|
||||
if (window.__TAURI__) {
|
||||
return tauriStreamFetch(url, options)
|
||||
.then((res) => res.text())
|
||||
.then((data) => ({ data }));
|
||||
return tauriStreamFetch(url, options);
|
||||
// const payload = options?.body || options?.data;
|
||||
// return tauriFetch(url, {
|
||||
// ...options,
|
||||
@@ -319,7 +317,9 @@ export function adapter(config: Record<string, unknown>) {
|
||||
const fetchUrl = params
|
||||
? `${path}?${new URLSearchParams(params as any).toString()}`
|
||||
: path;
|
||||
return fetch(fetchUrl as string, { ...rest, responseType: "text" });
|
||||
return fetch(fetchUrl as string, { ...rest, responseType: "text" })
|
||||
.then((res) => res.text())
|
||||
.then((data) => ({ data }));
|
||||
}
|
||||
|
||||
export function safeLocalStorage(): {
|
||||
|
Reference in New Issue
Block a user