From e617c6fa574725544a014151523cf52d5566790c Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Tue, 21 Oct 2025 15:19:56 +0800 Subject: [PATCH] fix --- src/index.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index b3a665d..875000a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -79,14 +79,8 @@ app.get("/api/projects", async (c) => { } }) -// 代理路由:将 /projects/:slug 重定向到 /api/projects/:slug +// 项目访问路由 - 直接处理项目内容 app.get("/projects/:slug", async (c) => { - const slug = c.req.param("slug") - return c.redirect(`/api/projects/${slug}`) -}) - -// 获取项目内容(托管) -app.get("/api/projects/:slug", async (c) => { try { const slug = c.req.param("slug") const project = await findProjectBySlug(slug) @@ -121,6 +115,7 @@ app.get("/api/projects/:slug", async (c) => { } }) + // 项目上传API app.post("/api/upload", async (c) => { try {