From 23ca75e870c789b06b3f734cd5f354f531faf35b Mon Sep 17 00:00:00 2001 From: xion Date: Sun, 23 Jun 2024 01:20:28 +0800 Subject: [PATCH] fix: remove --- .gitignore | 2 ++ src/admin/index.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3c3629e..35ccbe5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ node_modules + +dist \ No newline at end of file diff --git a/src/admin/index.ts b/src/admin/index.ts index 566861b..78783fe 100644 --- a/src/admin/index.ts +++ b/src/admin/index.ts @@ -26,6 +26,7 @@ router.add(removeRouter); // add router export const addRouter = new Route('admin', 'addRouter'); + addRouter.run = async (ctx) => { const { path, key } = ctx.query; router.add(new Route(path, key)); @@ -38,7 +39,7 @@ router.add(addRouter); export const updateRouter = new Route('admin', 'updateRouter'); updateRouter.run = async (ctx) => { const { path, key } = ctx.query; - // router.update(path, key); + router.add(new Route(path, key)); ctx.body = 'success'; return ctx; }