Skip to content

Commit

Permalink
🎨 Improve data order
Browse files Browse the repository at this point in the history
  • Loading branch information
Xen0Xys committed May 23, 2024
1 parent ebab2b4 commit f53b81e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/webtoon/webtoon/webtoon-database.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ export class WebtoonDatabaseService{

async getWebtoons(): Promise<LightWebtoonResponse[]>{
const webtoons: any = await this.prismaService.webtoons.findMany({
orderBy: {
title: "asc"
},
include: {
thumbnail: true
}
Expand Down Expand Up @@ -296,7 +299,7 @@ export class WebtoonDatabaseService{
thumbnail: true
},
orderBy: {
number: "asc"
number: "desc"
},
skip: (chunkNumber - 1) * this.CHUNK_SIZE,
take: this.CHUNK_SIZE
Expand Down

0 comments on commit f53b81e

Please sign in to comment.