mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 17:38:40 -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({
|
return await this.prismaRepository.contact.findMany({
|
||||||
where,
|
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) {
|
public cleanMessageData(message: any) {
|
||||||
|
Loading…
Reference in New Issue
Block a user