From 50a7ded175d66741f2e9e06055b68ec764844aea Mon Sep 17 00:00:00 2001 From: whyour Date: Wed, 17 Jan 2024 23:48:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E6=96=87=E4=BB=B6=20api=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/api/config.ts | 2 +- src/pages/diff/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/back/api/config.ts b/back/api/config.ts index 99649fb3..55c740fd 100644 --- a/back/api/config.ts +++ b/back/api/config.ts @@ -14,7 +14,7 @@ export default (app: Router) => { app.use('/configs', route); route.get( - '/sample', + '/samples', async (req: Request, res: Response, next: NextFunction) => { try { res.send({ diff --git a/src/pages/diff/index.tsx b/src/pages/diff/index.tsx index 5897cb2e..3b42d91e 100644 --- a/src/pages/diff/index.tsx +++ b/src/pages/diff/index.tsx @@ -64,7 +64,7 @@ const Diff = () => { const getFiles = () => { setLoading(true); request - .get(`${config.apiPrefix}configs/sample`) + .get(`${config.apiPrefix}configs/samples`) .then(({ code, data }) => { if (code === 200) { setFiles(data);