chore: send email and recive
This commit is contained in:
@@ -35,6 +35,12 @@ export class UsersService {
|
||||
private readonly domainsService: DomainsService,
|
||||
) {}
|
||||
|
||||
async getUserEmailIdFromId(userId: string) {
|
||||
const user = await this.userRepository.findOne({ id: userId }, { populate: ["role"] });
|
||||
if (!user) throw new BadRequestException(UserMessage.USER_NOT_FOUND);
|
||||
return user.wildduckUserId;
|
||||
}
|
||||
|
||||
async findOneWithEmail(email: string, businessId: string) {
|
||||
const user = await this.userRepository.findOne({ emailAddress: email, business: { id: businessId } }, { populate: ["role"] });
|
||||
return user;
|
||||
|
||||
Reference in New Issue
Block a user