mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-22 20:12:02 -06:00
Update src/api/services/channel.service.ts
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
parent
427c994993
commit
787d90ff20
@ -505,7 +505,15 @@ export class ChannelStartupService {
|
||||
|
||||
return await this.prismaRepository.contact.findMany({
|
||||
where,
|
||||
});
|
||||
};
|
||||
|
||||
if (query.offset) contactFindManyArgs.take = query.offset;
|
||||
if (query.page) {
|
||||
const validPage = Math.max(query.page as number, 1);
|
||||
contactFindManyArgs.skip = query.offset * (validPage - 1);
|
||||
}
|
||||
|
||||
return await this.prismaRepository.contact.findMany(contactFindManyArgs);
|
||||
}
|
||||
|
||||
public cleanMessageData(message: any) {
|
||||
|
Loading…
Reference in New Issue
Block a user