mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 21:58:03 +00:00
refactor: netease api routes
This commit is contained in:
parent
7c79afd0d1
commit
996904f056
5 changed files with 225 additions and 8810 deletions
|
|
@ -196,7 +196,7 @@ export function addOrRemoveTrackFromPlaylist(params) {
|
|||
export function dailyRecommendTracks() {
|
||||
return request({
|
||||
url: '/recommend/songs',
|
||||
method: 'post',
|
||||
method: 'get',
|
||||
params: { timestamp: new Date().getTime() },
|
||||
}).then(result => {
|
||||
result.data.dailySongs = mapTrackPlayableStatus(
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ const bodyParser = require('body-parser');
|
|||
const cache = require('../../netease_api/util/apicache').middleware;
|
||||
const fileUpload = require('express-fileupload');
|
||||
import routes from '../../netease_api/routes';
|
||||
const clc = require('cli-color');
|
||||
|
||||
export function startNeteaseMusicApi() {
|
||||
// Integrate API
|
||||
|
|
@ -53,6 +54,10 @@ export function startNeteaseMusicApi() {
|
|||
const host = process.env.HOST || '127.0.0.1';
|
||||
|
||||
app.server = app.listen(port, host, () => {
|
||||
console.log(`server running @ http://${host ? host : 'localhost'}:${port}`);
|
||||
console.log(
|
||||
`${clc.redBright('[NetEase API]')} server running @ http://${
|
||||
host ? host : 'localhost'
|
||||
}:${port}`
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue