diff --git a/src/comunidades/comunidades.service.ts b/src/comunidades/comunidades.service.ts index 1f29ed7..8cd911d 100644 --- a/src/comunidades/comunidades.service.ts +++ b/src/comunidades/comunidades.service.ts @@ -181,13 +181,12 @@ export class ComunidadesService { async getUserCommunity(userEmail: string) { const user = await this.userModel.findOne({ email: userEmail }); - const userRelation = await this.userRelationModel.findOne({ - userId: user._id, + userId: user._id.toString(), }); if (!userRelation) - throw new MicrosserviceException( + throw new MicrosserviceException( 'Usuário não possui comunidade', HttpStatus.NOT_FOUND, ); @@ -239,4 +238,4 @@ export class ComunidadesService { return users; } -} +} \ No newline at end of file