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