fix orderBy not allowing null

This commit is contained in:
andres
2023-08-12 13:42:44 +02:00
parent e615fe7711
commit 2626bf3815
4 changed files with 4 additions and 6 deletions

View File

@@ -65,7 +65,7 @@ export class CardsRepository {
orderBy,
}: GetAllCardsInDeckDto
): Promise<PaginatedCardsWithGrade> {
if (!orderBy) {
if (!orderBy || orderBy === 'null') {
orderBy = 'updated-desc'
}
try {