YesPlayMusic/netease_api/module/playlist_cover_update.js
2021-03-06 22:07:16 +08:00

29 lines
577 B
JavaScript

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/playlist/cover/update`,
{
id: query.id,
coverImgId: uploadInfo.imgId,
},
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
return {
status: 200,
body: {
code: 200,
data: {
...uploadInfo,
...res.body,
},
},
}
}