mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-23 16:11:24 +08:00
user_update and playlist_update
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
const express = require("express");
|
||||
const router = express();
|
||||
const { createWebAPIRequest } = require("../util/util");
|
||||
|
||||
router.get("/", (req, res) => {
|
||||
const cookie = req.get("Cookie") ? req.get("Cookie") : "";
|
||||
const playlist_id = req.query.id;
|
||||
const desc_detail = req.query.desc || "";
|
||||
const tags_detail = req.query.tags || "";
|
||||
const name_detail = req.query.name;
|
||||
const data = {
|
||||
"/api/playlist/desc/update":
|
||||
'{"id":' + playlist_id + ',"desc":"' + desc_detail + '"}',
|
||||
"/api/playlist/tags/update":
|
||||
'{"id":' + playlist_id + ',"tags":"' + tags_detail + '"}',
|
||||
"/api/playlist/update/name":
|
||||
'{"id":' + playlist_id + ',"name":"' + name_detail + '"}',
|
||||
csrf_token: ""
|
||||
};
|
||||
createWebAPIRequest(
|
||||
"music.163.com",
|
||||
"/weapi/batch",
|
||||
"POST",
|
||||
data,
|
||||
cookie,
|
||||
music_req => {
|
||||
res.send(music_req);
|
||||
},
|
||||
err => res.status(502).send("fetch error")
|
||||
);
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user