feat: enhance label router with consistent output (#104)

This commit is contained in:
Henry
2025-07-07 22:33:01 +01:00
committed by GitHub
parent 1c920e3983
commit f4ef1217dc
2 changed files with 37 additions and 7 deletions

View File

@@ -23,7 +23,12 @@ export const create = async (
createdBy: labelInput.createdBy,
boardId: labelInput.boardId,
})
.returning({ id: labels.id });
.returning({
id: labels.id,
publicId: labels.publicId,
name: labels.name,
colourCode: labels.colourCode,
});
if (labelInput.cardId && result) {
await db.insert(cardsToLabels).values({
@@ -91,6 +96,7 @@ export const update = async (
.where(eq(labels.publicId, labelInput.labelPublicId))
.returning({
id: labels.id,
publicId: labels.publicId,
name: labels.name,
colourCode: labels.colourCode,
});