mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-07 00:42:08 +08:00
22
module/avatar_upload.js
Normal file
22
module/avatar_upload.js
Normal file
@ -0,0 +1,22 @@
|
||||
const uploadPlugin = require('../plugins/upload')
|
||||
module.exports = async (query, request) => {
|
||||
const uploadInfo = await uploadPlugin(query, request)
|
||||
const res = await request(
|
||||
'POST',
|
||||
`https://music.163.com/weapi/user/avatar/upload/v1`,
|
||||
{
|
||||
imgid: uploadInfo.imgId
|
||||
},
|
||||
{ crypto: 'weapi', cookie: query.cookie, proxy: query.proxy }
|
||||
)
|
||||
return {
|
||||
status: 200,
|
||||
body: {
|
||||
code: 200,
|
||||
data: {
|
||||
...uploadInfo,
|
||||
...res.body,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user