mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-06 23:42:07 +08:00
make the response of /login/status corresponding to /login
This commit is contained in:
@ -9,12 +9,11 @@ module.exports = (req, res, createWebAPIRequest, request) => {
|
|||||||
cookie,
|
cookie,
|
||||||
(music_req, cookie) => {
|
(music_req, cookie) => {
|
||||||
try {
|
try {
|
||||||
var userInfo = (/var GUser=([^;]+);/g).exec(music_req)[1];
|
var profile = (/var GUser=([^;]+);/g).exec(music_req)[1];
|
||||||
var bindInfo = (/var GBinds=([^;]+);/g).exec(music_req)[1];
|
var bindings = (/var GBinds=([^;]+);/g).exec(music_req)[1];
|
||||||
userInfo = eval(`(${userInfo})`);
|
profile = eval(`(${profile})`);
|
||||||
userInfo.userBind = eval(`(${bindInfo})`);
|
bindings = eval(`(${bindings})`);
|
||||||
userInfo.userBind.forEach((item) => {item.tokenJsonStr = JSON.parse(item.tokenJsonStr)});
|
res.send({code: 200,profile: profile, bindings: bindings});
|
||||||
res.send(userInfo);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
res.status(502).send("fetch error");
|
res.status(502).send("fetch error");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user