forked from pinks/eris
1
0
Fork 0
nyx/api/jobsRoute.ts

14 lines
342 B
TypeScript
Raw Permalink Normal View History

2023-10-05 09:00:51 +00:00
import { Endpoint, Route } from "t_rest/server";
import { generationQueue } from "../app/generationQueue.ts";
export const jobsRoute = {
GET: new Endpoint(
{ query: null, body: null },
async () => ({
status: 200,
type: "application/json",
body: await generationQueue.getAllJobs(),
}),
),
} satisfies Route;