Fixed the sorting buf with version history

This commit is contained in:
Vladyslav Matsiiako
2023-01-02 18:53:56 -08:00
parent 6845e9129a
commit d0949b2e19
2 changed files with 42 additions and 26 deletions

View File

@@ -18,6 +18,7 @@ import { SecretVersion } from '../../models';
secretVersions = await SecretVersion.find({
secret: secretId
})
.sort({ createdAt: -1 })
.skip(offset)
.limit(limit);