[fix] fix requesting zip

This commit is contained in:
kwaroran
2023-11-27 18:57:34 +09:00
parent 6bb3fe3712
commit a7f9fa3a22
5 changed files with 70 additions and 29 deletions

View File

@@ -685,16 +685,6 @@ export async function globalFetch(url:string, arg:{
headers: headers,
method: method
})
if(da.headers.get('content-type')?.includes('application/x-zip-compressed')){
const daText = await da.blob()
addFetchLog(daText, da.ok && da.status >= 200 && da.status < 300)
return {
ok: da.ok && da.status >= 200 && da.status < 300,
data: daText,
headers: Object.fromEntries(da.headers)
}
}
const daText = await da.text()
try {
const dat = JSON.parse(daText)