mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 11:19:14 +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 {
|
|
//
|
|
}
|
|
})
|