Files
deckyvault/lib/api/hardware.ts
T
adrianbonpin fbfc43832e feat: add OpenAPI support and in-process cron scheduler
- Install @elysia/openapi to auto-generate API docs at /api/openapi
- Install @elysia/cron for in-process scheduled jobs (orphan detection at 2am, storage cleanup at 3am)
- Add Scalar UI docs with 14 tag groups and Bearer JWT security scheme
- Add route-level detail annotations (tags, summaries) to all 30+ route files
- Upgrade crud-builder to accept optional tags config
- Keep HTTP cron endpoint as manual/admin fallback
2026-05-14 21:43:33 +08:00

12 lines
342 B
TypeScript

import { createCrudRoutes } from "./crud-builder"
import { hardware } from "@/lib/db/schema"
export const hardwareRoutes = createCrudRoutes(hardware, {
prefix: "/hardware",
name: "Hardware",
tags: ["Hardware"],
primaryKey: "slug",
auth: { read: "public", write: "admin", delete: "admin" },
filter: { fields: ["deviceType"] },
})