diff --git a/packages/client/src/api/acoount.ts b/packages/client/src/api/acoount.ts index aebe5dd1..de865ca4 100644 --- a/packages/client/src/api/acoount.ts +++ b/packages/client/src/api/acoount.ts @@ -2,7 +2,7 @@ import { instance } from '@/api/instance'; import { Account } from '@/types/account'; export async function myAccount(token: string): Promise { - const response = await instance.get(`/api/account/myaccount`, { + const response = await instance.get(`/account/myaccount`, { headers: { Authorization: `Bearer ${token}`, }, diff --git a/packages/client/src/api/auth.ts b/packages/client/src/api/auth.ts index 20b75148..ef313dd4 100644 --- a/packages/client/src/api/auth.ts +++ b/packages/client/src/api/auth.ts @@ -2,12 +2,12 @@ import { instance } from '@/api/instance'; import { LogOut, Login } from '@/types/auth'; export async function guestLogin(): Promise { - const response = await instance.post('/api/auth/guest-login'); + const response = await instance.post('/auth/guest-login'); return response.data; } export async function logout(token: string): Promise { - const response = await instance.delete('/api/auth/logout', { + const response = await instance.delete('/auth/logout', { headers: { Authorization: `Bearer ${token}`, }, diff --git a/packages/client/src/api/market.ts b/packages/client/src/api/market.ts index c2c9c965..b9f7655a 100644 --- a/packages/client/src/api/market.ts +++ b/packages/client/src/api/market.ts @@ -3,12 +3,12 @@ import { Candle, CandlePeriod } from '@/types/chart'; import { MarketData, SidebarMarketData } from '@/types/market'; export async function getMarketAll(): Promise { - const response = await instance.get('/api/upbit/market/all'); + const response = await instance.get('/upbit/market/all'); return response.data; } export async function getMarketTop20(): Promise { - const response = await instance.get('/api/upbit/market/top20-trade/krw'); + const response = await instance.get('/upbit/market/top20-trade/krw'); return response.data; } @@ -16,7 +16,7 @@ export async function getRecentlyMarketList( queryString: string, ): Promise { const response = await instance.get( - `/api/upbit/market/simplelist/krw?${queryString}`, + `/upbit/market/simplelist/krw?${queryString}`, ); return response.data; } @@ -29,8 +29,8 @@ export async function getCandleByPeriod( ): Promise { const url = params === 'minutes' - ? `/api/upbit/candle/${params}/${minutes}` - : `/api/upbit/candle/${params}`; + ? `/upbit/candle/${params}/${minutes}` + : `/upbit/candle/${params}`; const response = await instance.get(url, { params: { diff --git a/packages/client/src/api/trade.ts b/packages/client/src/api/trade.ts index cf55cc4b..8fc88747 100644 --- a/packages/client/src/api/trade.ts +++ b/packages/client/src/api/trade.ts @@ -13,7 +13,7 @@ export async function calculatePercentageBuy( token: string, ): Promise { const response = await instance.get( - `/api/trade/calculate-percentage-${askType}/${moneyType}?percent=${percent}`, + `/trade/calculate-percentage-${askType}/${moneyType}?percent=${percent}`, { headers: { Authorization: `Bearer ${token}`, @@ -34,7 +34,7 @@ type TradeAPI = { export async function trade(params: TradeAPI, token: string): Promise { const response = await instance.post( - `/api/trade/${params.askType}`, + `/trade/${params.askType}`, { typeGiven: params.typeGiven, typeReceived: params.typeReceived, @@ -55,7 +55,7 @@ export async function checkCoin( coin: string, token: string, ): Promise { - const response = await instance.get(`/api/trade/check-coinData/${coin}`, { + const response = await instance.get(`/trade/check-coinData/${coin}`, { headers: { Authorization: `Bearer ${token}`, }, @@ -67,7 +67,7 @@ export async function pendingCoin( coin: string, token: string, ): Promise { - const response = await instance.get(`/api/trade/tradeData/${coin}`, { + const response = await instance.get(`/trade/tradeData/${coin}`, { headers: { Authorization: `Bearer ${token}`, },