File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ cardRouter.post(
2323 if ( ! isCurrentColumn ) return next ( NotFound ( 'Column not found' ) )
2424
2525 const lastCard = await prisma . card . findFirst ( {
26- where : { columnId : params . columnId } ,
26+ where : { columnId : isCurrentColumn . id } ,
2727 orderBy : { order : 'desc' } ,
2828 select : { order : true }
2929 } )
@@ -66,7 +66,7 @@ cardRouter.patch(
6666 const transaction = body . ids . map ( ( id , order ) =>
6767 prisma . card . update ( {
6868 where : { id } ,
69- data : { order, columnId : params . columnId }
69+ data : { order, columnId : column . id }
7070 } )
7171 )
7272
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ columnRouter.post(
2626 if ( ! board ) return next ( NotFound ( 'Board not found' ) )
2727
2828 const lastColumn = await prisma . column . findFirst ( {
29- where : { boardId : params . boardId } ,
29+ where : { boardId : board . id } ,
3030 orderBy : { order : 'desc' } ,
3131 select : { order : true }
3232 } )
@@ -69,7 +69,7 @@ columnRouter.patch(
6969 const transaction = body . ids . map ( ( id , order ) =>
7070 prisma . column . update ( {
7171 where : { id } ,
72- data : { order, boardId : params . boardId }
72+ data : { order, boardId : board . id }
7373 } )
7474 )
7575
You can’t perform that action at this time.
0 commit comments