diff --git a/src/domain/blurting/blurting.controller.ts b/src/domain/blurting/blurting.controller.ts index 8834084..8887944 100644 --- a/src/domain/blurting/blurting.controller.ts +++ b/src/domain/blurting/blurting.controller.ts @@ -128,7 +128,7 @@ export class BlurtingController { @User() userPayload: JwtPayload, ): Promise { const { id } = userPayload; - this.blurtingService.getArrows(id); + return this.blurtingService.getArrows(id); } diff --git a/src/domain/blurting/blurting.service.ts b/src/domain/blurting/blurting.service.ts index e941356..1db147b 100644 --- a/src/domain/blurting/blurting.service.ts +++ b/src/domain/blurting/blurting.service.ts @@ -513,7 +513,7 @@ export class BlurtingService { if (!user.group) return { matching: false, matchedWith: null, iReceived: [] }; - let matchedWith; + let matchedWith = null; let matching = false; const question = await this.questionRepository.findLatestByGroup( user.group.id, @@ -550,7 +550,7 @@ export class BlurtingService { ); if (!matching) { let user; - if (sendArrow.to) { + if (sendArrow && sendArrow.to) { const images = await this.userService.getUserImages(sendArrow.to.id); user = await this.userService.getUserProfile(sendArrow.to.id, images); }