kaneo (minimalist kanban) fork to experiment adding a tangled integration
github.com/usekaneo/kaneo
1import { HTTPException } from "hono/http-exception";
2import db from "../../database";
3
4function getLabel(id: string) {
5 const label = db.query.labelTable.findFirst({
6 where: (label, { eq }) => eq(label.id, id),
7 });
8
9 if (!label) {
10 throw new HTTPException(404, {
11 message: "Label not found",
12 });
13 }
14
15 return label;
16}
17
18export default getLabel;