import { Body, Controller, HttpCode, HttpStatus, Post, Req, UseGuards, } from '@nestjs/common'; import { WrapperService } from '../service/wrapper.service'; import { JwtAuthGuard } from 'src/module/auth/guards/jwt.guard'; @Controller('wrapper') // @UseGuards(JwtAuthGuard) export class WrapperController { constructor(private readonly wrapperService: WrapperService) {} /** * API for sending mail (uses WrapperService.sendMailWrapper) */ @Post('send-mail') @HttpCode(HttpStatus.OK) async sendMail(@Body() payload: any, @Req() req: any) { const loggedInUser = req.user.userData; return this.wrapperService.sendMailWrapper(payload, loggedInUser); } /** * API for scheduling meeting (uses WrapperService.scheduleMeetingWrapper) */ @Post('schedule-meeting') @HttpCode(HttpStatus.OK) async scheduleMeeting(@Body() payload: any) { return this.wrapperService.scheduleMeetingWrapper(payload, { }); } }