mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-02-12 16:30:04 +08:00
15 lines
341 B
TypeScript
15 lines
341 B
TypeScript
![]() |
import { getCacheTable } from "#/database/cache"
|
||
|
|
||
|
export default defineEventHandler(async (event) => {
|
||
|
try {
|
||
|
const { sources } = await readBody(event)
|
||
|
const cacheTable = await getCacheTable()
|
||
|
if (sources && cacheTable) {
|
||
|
const data = await cacheTable.getEntries(sources)
|
||
|
return data
|
||
|
}
|
||
|
} catch {
|
||
|
//
|
||
|
}
|
||
|
})
|