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