fix: allow reordering without supplying an index when updating cards

This commit is contained in:
Henry
2026-05-11 12:54:35 +01:00
parent c0962e9f70
commit b60c48838d

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,