Se agregaron validaciones
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// src/excel/excel.controller.ts
|
||||
import { Controller, Post, Get, UseGuards, Request, Res, UploadedFile, UseInterceptors, HttpStatus, Param, ParseIntPipe, Body } from '@nestjs/common';
|
||||
import { SendCorreoDto } from './dto/send-email.dto';
|
||||
import { MailService } from './mail.service';
|
||||
|
||||
|
||||
@Controller('mail')
|
||||
export class MailController {
|
||||
constructor(
|
||||
private readonly mailService: MailService
|
||||
) { }
|
||||
|
||||
@Post('send')
|
||||
async sendMail(@Body() body: SendCorreoDto) {
|
||||
const result =
|
||||
await this.mailService.sendMail(body)
|
||||
.then((value) => {
|
||||
console.log("Se mandaron los correos", value);
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
|
||||
// sistem
|
||||
return result;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user