mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
feat: Add user playlist endpoints & domain overrides (bump 4.30.1) (#105)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
dependabot[bot]
parent
a19418bbb6
commit
2a0b54e442
+6
-6
@@ -194,11 +194,11 @@ const createRequest = (uri, data, options) => {
|
||||
// 根据加密方式处理
|
||||
switch (crypto) {
|
||||
case 'weapi':
|
||||
headers['Referer'] = DOMAIN
|
||||
headers['Referer'] = options.domain || DOMAIN
|
||||
headers['User-Agent'] = options.ua || chooseUserAgent('weapi')
|
||||
data.csrf_token = csrfToken
|
||||
encryptData = encrypt.weapi(data)
|
||||
url = DOMAIN + '/weapi/' + uri.substr(5)
|
||||
url = (options.domain || DOMAIN) + '/weapi/' + uri.substr(5)
|
||||
break
|
||||
|
||||
case 'linuxapi':
|
||||
@@ -206,10 +206,10 @@ const createRequest = (uri, data, options) => {
|
||||
options.ua || chooseUserAgent('linuxapi', 'linux')
|
||||
encryptData = encrypt.linuxapi({
|
||||
method: 'POST',
|
||||
url: DOMAIN + uri,
|
||||
url: (options.domain || DOMAIN) + uri,
|
||||
params: data,
|
||||
})
|
||||
url = DOMAIN + '/api/linux/forward'
|
||||
url = (options.domain || DOMAIN) + '/api/linux/forward'
|
||||
break
|
||||
|
||||
case 'eapi':
|
||||
@@ -249,9 +249,9 @@ const createRequest = (uri, data, options) => {
|
||||
: ENCRYPT_RESPONSE,
|
||||
)
|
||||
encryptData = encrypt.eapi(uri, data)
|
||||
url = API_DOMAIN + '/eapi/' + uri.substr(5)
|
||||
url = (options.domain || API_DOMAIN) + '/eapi/' + uri.substr(5)
|
||||
} else if (crypto === 'api') {
|
||||
url = API_DOMAIN + uri
|
||||
url = (options.domain || API_DOMAIN) + uri
|
||||
encryptData = data
|
||||
}
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user