mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 03:09:14 +08:00
fix(server): cache failed
This commit is contained in:
parent
5d622a9bf4
commit
49d1b5cbea
@ -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`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user