import { Controller, Get } from "@nestjs/common";

import {
  {{ module_class_name }}Service,
  CorsMetadataPayload,
  CORS_FEATURES,
} from "./cors.service";

@Controller("security/cors")
export class {{ module_class_name }}Controller {
  constructor(private readonly corsService: {{ module_class_name }}Service) {}

  @Get("metadata")
  getMetadata(): CorsMetadataPayload {
    return this.corsService.getMetadata();
  }

  @Get("features")
  listFeatures(): { features: string[] } {
    return { features: [...CORS_FEATURES] };
  }
}
