import { Controller, Get, Query } from '@nestjs/common';
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { AuthUser, CurrentUser } from '../../common/current-user.decorator';
import { RequirePermissions } from '../../common/permissions.decorator';
import { MapService } from './map.service';

@ApiBearerAuth()
@ApiTags('地图监控')
@RequirePermissions('map:view')
@Controller('map')
export class MapController {
  constructor(private readonly mapService: MapService) {}

  @Get('points')
  points(@CurrentUser() user: AuthUser, @Query() query: any) {
    return this.mapService.points(user, query);
  }
}
