memorium/routes/api/cache.ts

13 lines
317 B
TypeScript
Raw Normal View History

2025-01-18 00:46:05 +01:00
import { Handlers } from "$fresh/server.ts";
import { documentTable } from "@lib/db/schema.ts";
import { db } from "@lib/db/sqlite.ts";
import { json } from "@lib/helpers.ts";
export const handler: Handlers = {
async DELETE() {
await db.delete(documentTable).run();
return json({ status: "ok" });
},
};