⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
fix: fix public project access after getTasks response shape change (#1088)
Ivan Bobchenkovf17400ed37d4
diff --git a/apps/api/src/project/controllers/get-public-project.ts b/apps/api/src/project/controllers/get-public-project.tsindex 3dfdc5efe..6813a2922 100644--- a/apps/api/src/project/controllers/get-public-project.ts+++ b/apps/api/src/project/controllers/get-public-project.ts@@ -2,19 +2,19 @@ import { HTTPException } from "hono/http-exception";import getTasks from "../../task/controllers/get-tasks";export async function getPublicProject(id: string) {- const project = await getTasks(id);+ const result = await getTasks(id);- if (!project) {+ if (!result.data) {throw new HTTPException(404, {message: "Project not found",});}- if (!project.isPublic) {+ if (!result.data.isPublic) {throw new HTTPException(403, {message: "Project is not public",});}- return project;+ return result.data;}