mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-03 17:02:09 +08:00
refactor: 默认返回值都是未加密的
This commit is contained in:
parent
157a058f74
commit
9006fdc938
@ -204,11 +204,7 @@ const createRequest = (method, uri, data = {}, options) => {
|
||||
x.replace(/\s*Domain=[^(;|$)]+;*/, ''),
|
||||
)
|
||||
try {
|
||||
if (options.crypto === 'eapi') {
|
||||
answer.body = JSON.parse(encrypt.decrypt(body))
|
||||
} else {
|
||||
answer.body = body
|
||||
}
|
||||
answer.body = JSON.parse(body.toString())
|
||||
if (answer.body.code) {
|
||||
answer.body.code = Number(answer.body.code)
|
||||
}
|
||||
@ -224,7 +220,7 @@ const createRequest = (method, uri, data = {}, options) => {
|
||||
} catch (e) {
|
||||
// console.log(e)
|
||||
try {
|
||||
answer.body = JSON.parse(body.toString())
|
||||
answer.body = JSON.parse(encrypt.decrypt(body))
|
||||
} catch (err) {
|
||||
// console.log(err)
|
||||
// can't decrypt and can't parse directly
|
||||
|
Loading…
x
Reference in New Issue
Block a user