Skip to content

Commit

Permalink
refactor: Add query parameter logging in AddressController's search m…
Browse files Browse the repository at this point in the history
…ethod
  • Loading branch information
PleBea committed Jul 26, 2024
1 parent 7161bca commit aa4ace3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/modules/address/address.controller.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -17,7 +17,10 @@ export class AddressController {
@ApiOperation({ summary: '주소 검색' })
@ApiOkResponse({ description: '주소 검색 성공', type: AddressResponseDTO })
async search(@Query('query') query: string): Promise<AddressResponseDTO> {
console.log('query', query);
const logger = new Logger('AddressController');

logger.log(`search query: ${query}`);

return await this.addressService.getSimilarAddress(query);
}
}

0 comments on commit aa4ace3

Please sign in to comment.