kaneo (minimalist kanban) fork to experiment adding a tangled integration github.com/usekaneo/kaneo
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at cd7cada2f86b4e866a15b4323bb8d6d7ab5bba8b 26 lines 641 B view raw
1import { eq } from "drizzle-orm"; 2import { HTTPException } from "hono/http-exception"; 3import db from "../../database"; 4import { labelTable } from "../../database/schema"; 5 6async function updateLabel(id: string, name: string, color: string) { 7 const label = await db.query.labelTable.findFirst({ 8 where: (label, { eq }) => eq(label.id, id), 9 }); 10 11 if (!label) { 12 throw new HTTPException(404, { 13 message: "Label not found", 14 }); 15 } 16 17 const [updatedLabel] = await db 18 .update(labelTable) 19 .set({ name, color }) 20 .where(eq(labelTable.id, id)) 21 .returning(); 22 23 return updatedLabel; 24} 25 26export default updateLabel;