import { Controller, Get } from '@nestjs/common';
import { loadFeatureConfig } from '../config/feature-loader';
import { Public } from '../domain/auth/Public';

@Controller('features')
export class FeaturesController {
  @Public()
  @Get()
  async getFeatures() {
    const result = await loadFeatureConfig();
    
    return {
      features: result.features,
      loadedFrom: result.loadedFrom,
      timestamp: new Date().toISOString(),
    };
  }
}