임시커밋
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type {
|
||||
DashboardChartTimeframe,
|
||||
DashboardStockChartResponse,
|
||||
} from "@/features/dashboard/types/dashboard.types";
|
||||
} from "@/features/trade/types/trade.types";
|
||||
import type { KisCredentialInput } from "@/lib/kis/config";
|
||||
import { hasKisConfig, normalizeTradingEnv } from "@/lib/kis/config";
|
||||
import { getDomesticChart } from "@/lib/kis/domestic";
|
||||
|
||||
@@ -3,7 +3,7 @@ import { executeOrderCash } from "@/lib/kis/trade";
|
||||
import {
|
||||
DashboardStockCashOrderRequest,
|
||||
DashboardStockCashOrderResponse,
|
||||
} from "@/features/dashboard/types/dashboard.types";
|
||||
} from "@/features/trade/types/trade.types";
|
||||
import {
|
||||
KisCredentialInput,
|
||||
hasKisConfig,
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
getDomesticOrderBook,
|
||||
KisDomesticOrderBookOutput,
|
||||
} from "@/lib/kis/domestic";
|
||||
import { DashboardStockOrderBookResponse } from "@/features/dashboard/types/dashboard.types";
|
||||
import { DashboardStockOrderBookResponse } from "@/features/trade/types/trade.types";
|
||||
import {
|
||||
KisCredentialInput,
|
||||
hasKisConfig,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { KOREAN_STOCK_INDEX } from "@/features/dashboard/data/korean-stocks";
|
||||
import type { DashboardStockOverviewResponse } from "@/features/dashboard/types/dashboard.types";
|
||||
import { KOREAN_STOCK_INDEX } from "@/features/trade/data/korean-stocks";
|
||||
import type { DashboardStockOverviewResponse } from "@/features/trade/types/trade.types";
|
||||
import type { KisCredentialInput } from "@/lib/kis/config";
|
||||
import { hasKisConfig, normalizeTradingEnv } from "@/lib/kis/config";
|
||||
import { getDomesticOverview } from "@/lib/kis/domestic";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { KOREAN_STOCK_INDEX } from "@/features/dashboard/data/korean-stocks";
|
||||
import { KOREAN_STOCK_INDEX } from "@/features/trade/data/korean-stocks";
|
||||
import type {
|
||||
DashboardStockSearchItem,
|
||||
DashboardStockSearchResponse,
|
||||
KoreanStockIndexItem,
|
||||
} from "@/features/dashboard/types/dashboard.types";
|
||||
} from "@/features/trade/types/trade.types";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
const SEARCH_LIMIT = 10;
|
||||
@@ -15,7 +15,7 @@ const SEARCH_LIMIT = 10;
|
||||
* - [레이어] API Route
|
||||
* - [사용자 행동] 대시보드 검색창 엔터/검색 버튼 클릭 시 호출
|
||||
* - [데이터 흐름] dashboard-main.tsx -> /api/kis/domestic/search -> KOREAN_STOCK_INDEX 필터/정렬 -> JSON 응답
|
||||
* - [연관 파일] features/dashboard/data/korean-stocks.ts, features/dashboard/components/dashboard-main.tsx
|
||||
* - [연관 파일] features/trade/data/korean-stocks.ts, features/trade/components/dashboard-main.tsx
|
||||
* @author jihoon87.lee
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@ const SEARCH_LIMIT = 10;
|
||||
* 국내주식 검색 API
|
||||
* @param request query string의 q(검색어) 사용
|
||||
* @returns 종목 검색 결과 목록
|
||||
* @see features/dashboard/components/dashboard-main.tsx 검색 폼에서 호출합니다.
|
||||
* @see features/trade/components/dashboard-main.tsx 검색 폼에서 호출합니다.
|
||||
*/
|
||||
export async function GET(request: NextRequest) {
|
||||
// [Step 1] query string에서 검색어(q)를 읽고 공백을 제거합니다.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DashboardKisRevokeResponse } from "@/features/dashboard/types/dashboard.types";
|
||||
import type { DashboardKisRevokeResponse } from "@/features/trade/types/trade.types";
|
||||
import { normalizeTradingEnv } from "@/lib/kis/config";
|
||||
import {
|
||||
parseKisCredentialRequest,
|
||||
@@ -14,7 +14,7 @@ import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
/**
|
||||
* @description KIS 액세스 토큰 폐기
|
||||
* @see features/dashboard/components/auth/KisAuthForm.tsx
|
||||
* @see features/settings/components/KisAuthForm.tsx
|
||||
*/
|
||||
export async function POST(request: NextRequest) {
|
||||
const credentials = await parseKisCredentialRequest(request);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DashboardKisValidateResponse } from "@/features/dashboard/types/dashboard.types";
|
||||
import type { DashboardKisValidateResponse } from "@/features/trade/types/trade.types";
|
||||
import { normalizeTradingEnv } from "@/lib/kis/config";
|
||||
import {
|
||||
parseKisCredentialRequest,
|
||||
@@ -14,7 +14,7 @@ import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
/**
|
||||
* @description 액세스 토큰 발급 성공 여부로 API 키를 검증합니다.
|
||||
* @see features/dashboard/components/auth/KisAuthForm.tsx
|
||||
* @see features/settings/components/KisAuthForm.tsx
|
||||
*/
|
||||
export async function POST(request: NextRequest) {
|
||||
const credentials = await parseKisCredentialRequest(request);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DashboardKisWsApprovalResponse } from "@/features/dashboard/types/dashboard.types";
|
||||
import type { DashboardKisWsApprovalResponse } from "@/features/trade/types/trade.types";
|
||||
import { getKisApprovalKey, resolveKisWebSocketUrl } from "@/lib/kis/approval";
|
||||
import { normalizeTradingEnv } from "@/lib/kis/config";
|
||||
import {
|
||||
@@ -14,7 +14,7 @@ import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
/**
|
||||
* @description 실시간 웹소켓 연결 정보를 발급합니다.
|
||||
* @see features/dashboard/hooks/useKisTradeWebSocket.ts
|
||||
* @see features/trade/hooks/useKisTradeWebSocket.ts
|
||||
*/
|
||||
export async function POST(request: NextRequest) {
|
||||
const credentials = await parseKisCredentialRequest(request);
|
||||
|
||||
Reference in New Issue
Block a user