mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-20 02:06:43 -06:00
fix: add option to select specific fields on find message repository
This commit is contained in:
parent
901954de33
commit
32e6ecb12d
@ -118,6 +118,7 @@ export class MessageRepository extends Repository {
|
|||||||
|
|
||||||
return await this.messageModel
|
return await this.messageModel
|
||||||
.find({ ...query.where })
|
.find({ ...query.where })
|
||||||
|
.select(query.select || {})
|
||||||
.sort({ messageTimestamp: -1 })
|
.sort({ messageTimestamp: -1 })
|
||||||
.limit(query?.limit ?? 0);
|
.limit(query?.limit ?? 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user