import { Controller, Get, Post, Body, Patch, Param, Delete, UseGuards } from '@nestjs/common';
import { SendingSmsAppointmentCancelledService } from './sending_sms_appointment_cancelled.service';
import { ThrottlerGuard, SkipThrottle } from '@nestjs/throttler';

@Controller('sending-sms-appointment-cancelled')
export class SendingSmsAppointmentCancelledController {
  constructor(private readonly sendingSmsAppointmentCancelledService: SendingSmsAppointmentCancelledService) {}
   @UseGuards( ThrottlerGuard)
   @SkipThrottle()
  @Post()
  async sendsms(@Body('mobileNumber') mobileNumber: string,
  @Body('name') name:string,
  @Body('date') date:any,
  @Body('reason') reason: string
  ) {
    const result = await this.sendingSmsAppointmentCancelledService.sendsms(mobileNumber,name,date,reason);
    return result
  }
}
