import { Controller, Delete, Param } from '@nestjs/common';
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { LotsService } from './lots.service';
import { Roles } from '../../common/decorators/roles.decorator';

@ApiTags('Vehicles')
@ApiBearerAuth()
@Controller('vehicles')
export class VehiclesController {
  constructor(private readonly lotsService: LotsService) {}

  @Roles('SYNDIC', 'COPROPRIETAIRE', 'LOCATAIRE')
  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.lotsService.removeVehicle(id);
  }
}
