fix: allow reordering without supplying an index when updating cards (#492)

This commit is contained in:
Henry
2026-05-11 13:18:07 +01:00
committed by GitHub
parent 82c8eef0c2
commit dd262ee50f

View File

@@ -945,7 +945,7 @@ export const cardRouter = createTRPCRouter({
);
}
if (input.index !== undefined) {
if (input.index !== undefined || newListId !== undefined) {
result = await cardRepo.reorder(ctx.db, {
cardId: existingCard.id,
newIndex: input.index,