mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-23 08:01:23 +08:00
格式化代码
This commit is contained in:
+8
-7
@@ -1,17 +1,18 @@
|
||||
const express = require("express")
|
||||
const express = require('express')
|
||||
const router = express()
|
||||
const { createRequest } = require("../util/util")
|
||||
const { createRequest } = require('../util/util')
|
||||
|
||||
router.get("/", (req, res) => {
|
||||
router.get('/', (req, res) => {
|
||||
const keywords = req.query.keywords
|
||||
const type = req.query.type || 1
|
||||
const limit = req.query.limit || 30
|
||||
const offset = req.query.offset || 0
|
||||
// 搜索单曲(1),歌手(100),专辑(10),歌单(1000),用户(1002) *(type)*
|
||||
const data = 's=' + keywords + '&limit=' + limit + '&type=' + type + '&offset=' + offset
|
||||
// 搜索单曲(1),歌手(100),专辑(10),歌单(1000),用户(1002) *(type)*
|
||||
const data =
|
||||
's=' + keywords + '&limit=' + limit + '&type=' + type + '&offset=' + offset
|
||||
createRequest('/api/search/pc/', 'POST', data)
|
||||
.then(result => {
|
||||
res.setHeader("Content-Type", "application/json")
|
||||
res.setHeader('Content-Type', 'application/json')
|
||||
res.send(result)
|
||||
})
|
||||
.catch(err => {
|
||||
@@ -19,4 +20,4 @@ router.get("/", (req, res) => {
|
||||
})
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
module.exports = router
|
||||
|
||||
Reference in New Issue
Block a user