import { Controller, Post, Body, UseGuards } from '@nestjs/common';
import { DoctorSlotShiftService } from './doctor_slot_shift.service';
import { DoctorSlotShift } from './entities/doctor_slot_shift.entity';
import { AuthGuard } from 'src/auth/auth.guard';
import { SkipThrottle, ThrottlerGuard } from '@nestjs/throttler';

@Controller('internal')
export class DoctorSlotShiftController {
  constructor(private readonly doctorSlotShiftService: DoctorSlotShiftService) { }


  @UseGuards(AuthGuard, ThrottlerGuard)
  @SkipThrottle()
  @Post('/slot')
  getSlot(@Body() Entity: DoctorSlotShift) {
    return this.doctorSlotShiftService.getSlot(Entity,Entity.patient_id);
  }
}
