kaneo (minimalist kanban) fork to experiment adding a tangled integration
github.com/usekaneo/kaneo
1import { HTTPException } from "hono/http-exception";
2import getTasks from "../../task/controllers/get-tasks";
3
4export async function getPublicProject(id: string) {
5 const result = await getTasks(id);
6
7 if (!result.data) {
8 throw new HTTPException(404, {
9 message: "Project not found",
10 });
11 }
12
13 if (!result.data.isPublic) {
14 throw new HTTPException(403, {
15 message: "Project is not public",
16 });
17 }
18
19 return result.data;
20}