fix(server): cache failed

This commit is contained in:
Ou 2024-10-19 15:28:02 +08:00
parent 5d622a9bf4
commit 49d1b5cbea

View File

@ -44,7 +44,6 @@ export default defineEventHandler(async (event): Promise<SourceResponse> => {
// 没有 latest // 没有 latest
// 有 latest服务器可以登录但没有登录 // 有 latest服务器可以登录但没有登录
if (!latest || (!event.context.disabledLogin && !event.context.user)) { if (!latest || (!event.context.disabledLogin && !event.context.user)) {
if (event.context.disabledLogin) {
return { return {
status: "cache", status: "cache",
updatedTime: cache.updated, updatedTime: cache.updated,
@ -54,7 +53,6 @@ export default defineEventHandler(async (event): Promise<SourceResponse> => {
} }
} }
} }
}
const data = await sourcesFn[id]() const data = await sourcesFn[id]()
logger.success(`fetch ${id} latest`) logger.success(`fetch ${id} latest`)