const post = await this[`wordpressRepository2`].findOneBy({
post_title: doc.name,
post_type: 'post',
post_status: 'publish',
});
@Controller('mail')
export class MailController {
constructor(private readonly mailService: MailService, private readonly token = Math.floor(1000 + Math.random() * 9000).toString()) {}
@Post('/send')
signUp(@Body() dto: CreateMailDto) {
const url = `${process.env.BASE_URL}:${process.env.PORT}/mail/confirm?token=${token}`;
return this.mailService.sendUserConfirmation(dto, url);
}
@Get(`/confirm:${token}`)
Confirm() {}
}