Skip to content

Commit fa14aba

Browse files
committed
Update fetchStatusMessage to handle empty offset / page
1 parent 427c994 commit fa14aba

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/api/services/channel.service.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,14 @@ export class ChannelStartupService {
656656
}
657657

658658
public async fetchStatusMessage(query: any) {
659+
if (!query?.offset) {
660+
query.offset = 50;
661+
}
662+
663+
if (!query?.page) {
664+
query.page = 1;
665+
}
666+
659667
return await this.prismaRepository.messageUpdate.findMany({
660668
where: {
661669
instanceId: this.instanceId,

0 commit comments

Comments
 (0)