forked from pinks/eris
16 lines
394 B
TypeScript
16 lines
394 B
TypeScript
import { createEndpoint, createMethodFilter } from "t_rest/server";
|
|
import { generationQueue } from "../app/generationQueue.ts";
|
|
|
|
export const jobsRoute = createMethodFilter({
|
|
GET: createEndpoint(
|
|
{ query: null, body: null },
|
|
async () => ({
|
|
status: 200,
|
|
body: {
|
|
type: "application/json",
|
|
data: await generationQueue.getAllJobs(),
|
|
},
|
|
}),
|
|
),
|
|
});
|