Merge pull request #475 from jaison-x/message-select

fix: add option to select specific fields on find message repository
This commit is contained in:
Davidson Gomes 2024-03-17 09:32:21 -03:00 committed by GitHub
commit 219e63c226
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,6 +118,7 @@ export class MessageRepository extends Repository {
return await this.messageModel
.find({ ...query.where })
.select(query.select || {})
.sort({ messageTimestamp: -1 })
.limit(query?.limit ?? 0);
}