refactor: request无需传入请求方式

This commit is contained in:
overwriter
2024-07-31 08:55:35 +08:00
parent 0fc4057a81
commit c1011b8602
273 changed files with 146 additions and 903 deletions
-4
View File
@@ -33,7 +33,6 @@ module.exports = async (query, request) => {
query.songFile.size = query.songFile.data.byteLength
}
const res = await request(
'POST',
`/api/cloud/upload/check`,
{
bitrate: String(bitrate),
@@ -92,7 +91,6 @@ module.exports = async (query, request) => {
console.log(error)
}
const tokenRes = await request(
'POST',
`/api/nos/token/alloc`,
{
bucket: '',
@@ -112,7 +110,6 @@ module.exports = async (query, request) => {
}
// console.log(tokenRes.body.result)
const res2 = await request(
'POST',
`/api/upload/cloud/info/v2`,
{
md5: query.songFile.md5,
@@ -129,7 +126,6 @@ module.exports = async (query, request) => {
// console.log({ res2, privateCloud: res2.body.privateCloud })
// console.log(res.body.songId, 'songid')
const res3 = await request(
'POST',
`/api/cloud/pub/v2`,
{
songid: res2.body.songId,