mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-22 23:51:23 +08:00
ci: update Node.js requirement and improve code consistency
Updated the README to require Node.js 18+ and added Docker usage instructions. Refactored util/client-sign.js for consistent code style and improved variable naming. Fixed the login_cellphone module to use 'weapi' in createOption. Removed deprecated code from server.js and improved CORS header formatting. Minor fix in util/request.js for user agent selection. Co-Authored-By: binaryify <[email protected]>
This commit is contained in:
+2
-3
@@ -100,7 +100,7 @@ const SPECIAL_STATUS_CODES = new Set([201, 302, 400, 502, 800, 801, 802, 803])
|
||||
|
||||
// chooseUserAgent函数
|
||||
const chooseUserAgent = (crypto, uaType = 'pc') => {
|
||||
return userAgentMap[crypto]?.[uaType] || ''
|
||||
return (userAgentMap[crypto] && userAgentMap[crypto][uaType]) || ''
|
||||
}
|
||||
|
||||
// cookie处理
|
||||
@@ -152,8 +152,7 @@ const createHeaderCookie = (header) => {
|
||||
const generateRequestId = () => {
|
||||
return `${now()}_${floor(random() * 1000)
|
||||
.toString()
|
||||
.padStart(4, "0")}`;
|
||||
|
||||
.padStart(4, '0')}`
|
||||
}
|
||||
|
||||
const createRequest = (uri, data, options) => {
|
||||
|
||||
Reference in New Issue
Block a user