fix grades

This commit is contained in:
2023-08-07 16:00:31 +02:00
parent 8c5b09889a
commit 17b5c05685
6 changed files with 43 additions and 32 deletions

View File

@@ -22,7 +22,10 @@ export class GradesRepository {
try {
return await this.prisma.grade.upsert({
where: {
cardId,
cardId_userId: {
cardId,
userId,
},
},
update: {
grade,
@@ -45,7 +48,6 @@ export class GradesRepository {
card: {
connect: {
id: cardId,
shots: 1,
},
},
deck: {