mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
15 lines
488 B
TypeScript
15 lines
488 B
TypeScript
import { Handlers } from "$fresh/server.ts";
|
|
import { get_task_manager } from "../../../../../server.ts";
|
|
import { get_export_zip_response } from "../../../../../server/export_zip.ts";
|
|
|
|
export const handler: Handlers = {
|
|
GET(_req, ctx) {
|
|
const gid = parseInt(ctx.params.gid);
|
|
if (isNaN(gid)) {
|
|
return new Response("Bad Request", { status: 400 });
|
|
}
|
|
const m = get_task_manager();
|
|
return get_export_zip_response(gid, m.db);
|
|
},
|
|
};
|