Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(api): return 404 when a label does not exist

Andrej Acevski442a38230291
diff --git a/apps/api/src/label/controllers/get-label.ts b/apps/api/src/label/controllers/get-label.ts
index 1df249f24..6203cf175 100644
--- a/apps/api/src/label/controllers/get-label.ts
+++ b/apps/api/src/label/controllers/get-label.ts
@@ -1,8 +1,8 @@
import { HTTPException } from "hono/http-exception";
import db from "../../database";
-function getLabel(id: string) {
- const label = db.query.labelTable.findFirst({
+async function getLabel(id: string) {
+ const label = await db.query.labelTable.findFirst({
where: (label, { eq }) => eq(label.id, id),
});