修复it之家重新获取报错

This commit is contained in:
MyFaith 2023-09-05 19:04:20 +08:00
parent c42573c37c
commit 8d7f394153

View File

@ -128,8 +128,8 @@ itHomeRouter.get("/ithome/new", async (ctx) => {
message: "获取成功",
...routerInfo,
updateTime,
total: data.length,
data: newData,
total: newData.length,
data: newData
};
// 删除旧数据
@ -145,9 +145,9 @@ itHomeRouter.get("/ithome/new", async (ctx) => {
code: 200,
message: "获取成功",
...routerInfo,
total: data.length,
total: cachedData.length,
updateTime,
data: cachedData,
data: cachedData
};
} else {
// 如果缓存中也没有数据,则返回错误信息