Update douyin_music.js

This commit is contained in:
底层用户 2023-07-12 16:58:03 +08:00 committed by GitHub
parent eaba3db4de
commit 4ae8e6cfd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ const getData = (data) => {
};
// 抖音热歌榜
douyinMusicRouter.get("/douyinmusic", async (ctx) => {
douyinMusicRouter.get("/douyin_music", async (ctx) => {
console.log("获取抖音热歌榜");
try {
// 从缓存中获取数据
@ -76,7 +76,6 @@ douyinMusicRouter.get("/douyinmusic", async (ctx) => {
headers: HEADERS,
params: QUERIES,
});
console.log(response.data);
data = getData(response.data.music_list);
updateTime = new Date().toISOString();
// 将数据写入缓存
@ -102,7 +101,7 @@ douyinMusicRouter.get("/douyinmusic", async (ctx) => {
});
// 抖音热歌榜 - 获取最新数据
douyinMusicRouter.get("/douyinmusic/new", async (ctx) => {
douyinMusicRouter.get("/douyin_music/new", async (ctx) => {
console.log("获取抖音热歌榜 - 最新数据");
try {
// 从服务器拉取最新数据