fix(revisions): order by for identical created at date

This commit is contained in:
Karol Sójko 2023-10-10 13:26:18 +02:00
parent 08f7c5447b
commit 637593c1bc
No known key found for this signature in database
GPG key ID: C2F813669419D05F

View file

@ -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,
@ -146,6 +147,7 @@ export class MongoDBRevisionRepository implements RevisionRepositoryInterface {
},
order: {
createdAt: 'DESC',
_id: 'DESC',
},
})
} else {
@ -156,6 +158,7 @@ export class MongoDBRevisionRepository implements RevisionRepositoryInterface {
},
order: {
createdAt: 'DESC',
_id: 'DESC',
},
})
}