Skip to content

Commit

Permalink
Merge pull request #108 from boostcampwm-2024/refactor/jin/comment
Browse files Browse the repository at this point in the history
[BE] 오탈자 및 주석 수정
  • Loading branch information
uuuo3o authored Nov 14, 2024
2 parents 7fc8e4e + e964e78 commit 0965f2d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
9 changes: 8 additions & 1 deletion BE/src/stock/detail/stock-detail.controller.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import { Body, Controller, Get, Param, Post } from '@nestjs/common';
import { ApiBody, ApiOperation, ApiParam, ApiResponse } from '@nestjs/swagger';
import {
ApiBody,
ApiOperation,
ApiParam,
ApiResponse,
ApiTags,
} from '@nestjs/swagger';
import { StockDetailService } from './stock-detail.service';
import { InquirePriceResponseDto } from './dto/stock-detail-response.dto';
import { StockDetailChartRequestDto } from './dto/stock-detail-chart-request.dto';
import { InquirePriceChartResponseDto } from './dto/stock-detail-chart-response.dto';

@ApiTags('특정 주식 종목에 대한 detail 페이지 조회 API')
@Controller('/api/stocks')
export class StockDetailController {
constructor(private readonly stockDetailService: StockDetailService) {}
Expand Down
6 changes: 3 additions & 3 deletions BE/src/stock/detail/stock-detail.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class StockDetailService {
private readonly logger = new Logger();

constructor(
private readonly koreaInvetmentService: KoreaInvestmentService,
private readonly koreaInvestmentService: KoreaInvestmentService,
private readonly stockDetailRepository: StockDetailRepository,
) {}

Expand All @@ -41,7 +41,7 @@ export class StockDetailService {
queryParams,
);

return this.formatStockData(response.output);
return await this.formatStockData(response.output);
} catch (error) {
this.logger.error('API Error Details:', {
status: error.response?.status,
Expand Down Expand Up @@ -174,7 +174,7 @@ export class StockDetailService {
params: Record<string, string>,
): Promise<T> {
try {
const accessToken = await this.koreaInvetmentService.getAccessToken();
const accessToken = await this.koreaInvestmentService.getAccessToken();
const headers = getHeader(accessToken, trId);
const url = getFullURL(apiURL);

Expand Down
3 changes: 2 additions & 1 deletion BE/src/stock/topfive/stock-topfive.controller.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { ApiOperation, ApiQuery, ApiResponse } from '@nestjs/swagger';
import { ApiOperation, ApiQuery, ApiResponse, ApiTags } from '@nestjs/swagger';
import { Controller, Get, Query } from '@nestjs/common';
import { StockTopfiveService } from './stock-topfive.service';
import { StockRankingResponseDto } from './dto/stock-ranking-response.dto';
import { MarketType } from '../enum/market-type';

@ApiTags('오늘의 상/하위 종목 조회 API')
@Controller('/api/stocks')
export class StockTopfiveController {
constructor(private readonly topFiveService: StockTopfiveService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { TodayStockTradeHistoryOutputDto } from './today-stock-trade-history-out
export class TodayStockTradeHistoryResponseDto {
@ApiProperty({
type: TodayStockTradeHistoryOutputDto,
description: '상승률 순위',
description: '오늘 체결된 거래 내역 배열',
})
output: TodayStockTradeHistoryOutputDto[];
}
3 changes: 2 additions & 1 deletion BE/src/stock/trade/history/stock-trade-history.controller.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Controller, Get, Param } from '@nestjs/common';
import { ApiOperation, ApiParam, ApiResponse } from '@nestjs/swagger';
import { ApiOperation, ApiParam, ApiResponse, ApiTags } from '@nestjs/swagger';
import { StockTradeHistoryService } from './stock-trade-history.service';
import { TodayStockTradeHistoryResponseDto } from './dto/today-stock-trade-history-response.dto';
import { DailyStockTradeHistoryDataDto } from './dto/daily-stock-trade-history-data.dto';

@ApiTags('주식현재가 체결 조회 API')
@Controller('/api/stocks')
export class StockTradeHistoryController {
constructor(
Expand Down
6 changes: 4 additions & 2 deletions BE/src/stock/trade/history/stock-trade-history.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import { DailyStockTradeHistoryDataDto } from './dto/daily-stock-trade-history-d
export class StockTradeHistoryService {
private readonly logger = new Logger();

constructor(private readonly koreaInvetmentService: KoreaInvestmentService) {}
constructor(
private readonly koreaInvestmentService: KoreaInvestmentService,
) {}

/**
* 특정 주식의 현재가 체결 데이터를 반환하는 함수
Expand Down Expand Up @@ -146,7 +148,7 @@ export class StockTradeHistoryService {
params: Record<string, string>,
): Promise<T> {
try {
const accessToken = await this.koreaInvetmentService.getAccessToken();
const accessToken = await this.koreaInvestmentService.getAccessToken();
const headers = getHeader(accessToken, trId);
const url = getFullURL(apiURL);

Expand Down

0 comments on commit 0965f2d

Please sign in to comment.