import { Controller, Get } from '@nestjs/common'; import { plainToInstance } from 'class-transformer'; import { GetRegisterIndustryChangeApplicationDto } from './dtos/register-industry-change-application.dto'; import { IndustryChangeApplicationService } from './industry-change-application.service'; @Controller({ path: '/resident-register/industry-change-applications', }) export class IndustryChangeApplicationController { constructor( private readonly applicationsSerivce: IndustryChangeApplicationService, ) {} @Get() async getList() { const allApplications = await this.applicationsSerivce.getAll(); const transformed = plainToInstance( GetRegisterIndustryChangeApplicationDto, allApplications, { excludeExtraneousValues: true }, ); return transformed; } }