fix(revisions): order by for identical created at date
This commit is contained in:
parent
08f7c5447b
commit
637593c1bc
1 changed files with 3 additions and 0 deletions
|
@ -46,6 +46,7 @@ export class MongoDBRevisionRepository implements RevisionRepositoryInterface {
|
||||||
where: { userUuid: { $eq: dto.userUuid.value } },
|
where: { userUuid: { $eq: dto.userUuid.value } },
|
||||||
order: {
|
order: {
|
||||||
createdAt: 'ASC',
|
createdAt: 'ASC',
|
||||||
|
_id: 'ASC',
|
||||||
},
|
},
|
||||||
skip: dto.offset,
|
skip: dto.offset,
|
||||||
take: dto.limit,
|
take: dto.limit,
|
||||||
|
@ -146,6 +147,7 @@ export class MongoDBRevisionRepository implements RevisionRepositoryInterface {
|
||||||
},
|
},
|
||||||
order: {
|
order: {
|
||||||
createdAt: 'DESC',
|
createdAt: 'DESC',
|
||||||
|
_id: 'DESC',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -156,6 +158,7 @@ export class MongoDBRevisionRepository implements RevisionRepositoryInterface {
|
||||||
},
|
},
|
||||||
order: {
|
order: {
|
||||||
createdAt: 'DESC',
|
createdAt: 'DESC',
|
||||||
|
_id: 'DESC',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue