From aa4ace3896f8e5fc646117ddab6f0615d9e298c5 Mon Sep 17 00:00:00 2001 From: PleBea Date: Fri, 26 Jul 2024 14:41:15 +0900 Subject: [PATCH] refactor: Add query parameter logging in AddressController's search method --- src/modules/address/address.controller.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/address/address.controller.ts b/src/modules/address/address.controller.ts index ef5acb1..3c0f864 100644 --- a/src/modules/address/address.controller.ts +++ b/src/modules/address/address.controller.ts @@ -1,4 +1,4 @@ -import { Controller, Get, Query, UseGuards } from '@nestjs/common'; +import { Controller, Get, Logger, Query, UseGuards } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; import { ApiBearerAuth, ApiOkResponse, ApiOperation, ApiQuery, ApiTags } from '@nestjs/swagger'; @@ -17,7 +17,10 @@ export class AddressController { @ApiOperation({ summary: '주소 검색' }) @ApiOkResponse({ description: '주소 검색 성공', type: AddressResponseDTO }) async search(@Query('query') query: string): Promise { - console.log('query', query); + const logger = new Logger('AddressController'); + + logger.log(`search query: ${query}`); + return await this.addressService.getSimilarAddress(query); } }