feat: DSL 磁力聚合 — 搜索/解析/预览/投递 + cilisousuo 源 + 中英双语 + Docker 部署

This commit is contained in:
ice-a
2026-10-16 18:53:45 +08:00
commit d6999104bf
64 changed files with 16524 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import { downloadsCol, tryMongo } from '../utils/mongo'
/** 投递下载记录 */
export default defineEventHandler(async (event) => {
const limit = Math.min(Number(getQuery(event).limit) || 30, 200)
const data = await tryMongo(async () => {
const col = await downloadsCol()
const items = await col.find({}).sort({ createdAt: -1 }).limit(limit).toArray()
return items.map((it) => ({ ...it, _id: String(it._id) }))
})
return { items: data || [], offline: data === null }
})