13 lines
317 B
TypeScript
13 lines
317 B
TypeScript
|
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" });
|
||
|
},
|
||
|
};
|
||
|
|