Skip to content

Commit

Permalink
fix(revisions): order by for identical created at date
Browse files Browse the repository at this point in the history
  • Loading branch information
karolsojko committed Oct 10, 2023
1 parent 08f7c54 commit 637593c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class MongoDBRevisionRepository implements RevisionRepositoryInterface {
where: { userUuid: { $eq: dto.userUuid.value } },
order: {
createdAt: 'ASC',
_id: 'ASC',
},
skip: dto.offset,
take: dto.limit,
Expand Down Expand Up @@ -146,6 +147,7 @@ export class MongoDBRevisionRepository implements RevisionRepositoryInterface {
},
order: {
createdAt: 'DESC',
_id: 'DESC',
},
})
} else {
Expand All @@ -156,6 +158,7 @@ export class MongoDBRevisionRepository implements RevisionRepositoryInterface {
},
order: {
createdAt: 'DESC',
_id: 'DESC',
},
})
}
Expand Down

0 comments on commit 637593c

Please sign in to comment.