From f53b81eba20d65fe37a5d19b8fd4a8a5988ea138 Mon Sep 17 00:00:00 2001 From: Xen0Xys Date: Thu, 23 May 2024 16:27:03 +0200 Subject: [PATCH] :art: Improve data order --- src/modules/webtoon/webtoon/webtoon-database.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/webtoon/webtoon/webtoon-database.service.ts b/src/modules/webtoon/webtoon/webtoon-database.service.ts index ddfb810..ab8646e 100644 --- a/src/modules/webtoon/webtoon/webtoon-database.service.ts +++ b/src/modules/webtoon/webtoon/webtoon-database.service.ts @@ -233,6 +233,9 @@ export class WebtoonDatabaseService{ async getWebtoons(): Promise{ const webtoons: any = await this.prismaService.webtoons.findMany({ + orderBy: { + title: "asc" + }, include: { thumbnail: true } @@ -296,7 +299,7 @@ export class WebtoonDatabaseService{ thumbnail: true }, orderBy: { - number: "asc" + number: "desc" }, skip: (chunkNumber - 1) * this.CHUNK_SIZE, take: this.CHUNK_SIZE