This commit is contained in:
zjt
2024-05-21 21:59:30 +08:00
commit bfbed61780
21 changed files with 114397 additions and 0 deletions

19
src/routers/handler.ts Normal file
View File

@@ -0,0 +1,19 @@
import Txt23DHandler from "../biz/txt23d";
import Txt2ImgHandler from "../biz/txt2img";
import UpscaleHandler from "../biz/upScale";
import { RegistHandler } from "../utils/register";
// 首页路由
const HelloworldHandler = async (ctx: any) => {
ctx.body = "helloworld";
}
const InitHandler = () => {
RegistHandler("post", "/txt2img", Txt2ImgHandler);
RegistHandler("options", "/txt2img", Txt2ImgHandler);
RegistHandler("post", "/txt23d", Txt23DHandler);
RegistHandler("options", "/txt23d", Txt23DHandler);
RegistHandler("options", "/upscale", UpscaleHandler);
RegistHandler("post", "/upscale", UpscaleHandler);
}
export default InitHandler;

3
src/routers/router.ts Normal file
View File

@@ -0,0 +1,3 @@
import Router from "koa-router";
const router = new Router();
export default router;