diff --git a/src/external/where42/dto/where42.response.dto.ts b/src/external/where42/dto/where42.response.dto.ts index c6ae656..3d810bf 100644 --- a/src/external/where42/dto/where42.response.dto.ts +++ b/src/external/where42/dto/where42.response.dto.ts @@ -23,3 +23,11 @@ export class Where42ResponseDto { }) cluster: Cluster; } + +export class Where42RequestDto { + @ApiProperty({ + description: '42 로그인 ID', + example: 'yeju', + }) + login: string; +} diff --git a/src/external/where42/where42.controller.ts b/src/external/where42/where42.controller.ts index 4274c33..0012c1f 100644 --- a/src/external/where42/where42.controller.ts +++ b/src/external/where42/where42.controller.ts @@ -15,7 +15,10 @@ import { ApiTags, } from '@nestjs/swagger'; import { ExtAuthGuard } from 'src/auth/guard/ext-auth.guard'; -import { Where42ResponseDto } from './dto/where42.response.dto'; +import { + Where42RequestDto, + Where42ResponseDto, +} from './dto/where42.response.dto'; import { Where42Service } from './where42.service'; @ApiTags('Where42 전용 API') @@ -60,8 +63,11 @@ export class Where42Controller { } @Post('where42/where42All') - async where42All(@Body() logins: string[]): Promise { + async where42All( + @Body() logins: Where42RequestDto[], + ): Promise { this.logger.debug(`@where42All) where42All`); - return this.where42Service.where42All(logins); + const loginList = logins.map((loginDto) => loginDto.login); + return this.where42Service.where42All(loginList); } }