This commit is contained in:
2023-05-30 11:39:40 +08:00
parent 935cf97d57
commit 9988720376
4 changed files with 65 additions and 16 deletions

View File

@@ -1,13 +0,0 @@
import { Handlers } from "$fresh/server.ts";
import { get_task_manager } from "../../../server.ts";
import { Task } from "../../../task.ts";
export const handler: Handlers<Task[]> = {
async GET(_, _ctx) {
const t = get_task_manager();
const tasks = await t.db.get_tasks_by_pid(Deno.pid);
return new Response(JSON.stringify(tasks), {
headers: { "Content-Type": "application/json" },
});
},
};