调整 upload.web 请求返回

This commit is contained in:
wkj 2023-12-06 13:20:12 +08:00
parent 71e886f752
commit e81d83b06a
3 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,7 @@ export class Upload {
body: formData2,
method: 'POST',
};
const json = await (await fetch(uploadUrl, options)).json();
return json;
const result = await fetch(uploadUrl, options);
return result;
}
}

View File

@ -12,8 +12,8 @@ class Upload {
body: formData2,
method: 'POST',
};
const json = await (await fetch(uploadUrl, options)).json();
return json;
const result = await fetch(uploadUrl, options);
return result;
}
}
exports.Upload = Upload;

View File

@ -19,7 +19,7 @@ export class Upload {
method: 'POST',
};
const json = await (await fetch(uploadUrl, options)).json();
return json;
const result = await fetch(uploadUrl, options);
return result;
}
}