Skip to content

Commit

Permalink
refactor(api): api 엔드포인트 정의한 파일 이름 변경한다
Browse files Browse the repository at this point in the history
  • Loading branch information
leegwae committed Aug 11, 2023
1 parent a9ad936 commit 0afe4b7
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib/api/__tests__/panel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { apiUrl } from '@/lib/api/consts';
import { createPanel, type CreatePanelBody } from '@/lib/api/panel';
import { apiUrl } from '@/lib/apiUrl';

describe('panel api', () => {
it(`createPanel을 호출하면 패널 생성 API(${apiUrl.panel.create()})로 요청한다`, async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/api/auth.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { SuccessResponse, ErrorResponse } from '@/lib/api/types';

import { apiUrl } from '@/lib/api/consts';
import { apiClient } from '@/lib/apiClient';
import { apiUrl } from '@/lib/apiUrl';

export const signUp = async (body: SignUpBody): Promise<SignUpResult> =>
apiClient
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/api/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type {
GetMyPanelsResult,
} from '@/mocks/handlers/panel';

import { apiUrl } from '@/lib/api/consts';
import { apiClient } from '@/lib/apiClient';
import { apiUrl } from '@/lib/apiUrl';

export const getMyPanels = async (
params: GetMyPanelsParams,
Expand Down
2 changes: 1 addition & 1 deletion src/mocks/handlers/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import type { ErrorResponse } from '@/lib/api/types';

import { rest } from 'msw';

import { apiUrl } from '@/lib/api/consts';
import { API_BASE_URL } from '@/lib/apiClient';
import { apiUrl } from '@/lib/apiUrl';
import { myAccount } from '@/mocks/data/auth';

export const signUp = rest.post<SignUpBody, never, SignUpResponse>(
Expand Down
2 changes: 1 addition & 1 deletion src/mocks/handlers/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import type { SuccessResponse } from '@/lib/api/types';
import { faker } from '@faker-js/faker';
import { rest } from 'msw';

import { apiUrl } from '@/lib/api/consts';
import { API_BASE_URL } from '@/lib/apiClient';
import { apiUrl } from '@/lib/apiUrl';
import { myPanelList } from '@/mocks/data/panel';

export interface GetMyPanelsParams {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/__tests__/Login.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { rest } from 'msw';
import { MemoryRouter } from 'react-router-dom';

import * as apis from '@/lib/api/auth';
import { apiUrl } from '@/lib/apiUrl';
import { apiUrl } from '@/lib/api/consts';
import { renderWithQueryClient } from '@/lib/test-utils';
import { server } from '@/mocks/server';
import { Login } from '@/pages/Login';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/__tests__/SignUp.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { rest } from 'msw';
import { MemoryRouter } from 'react-router-dom';

import * as apis from '@/lib/api/auth';
import { apiUrl } from '@/lib/apiUrl';
import { apiUrl } from '@/lib/api/consts';
import { renderWithQueryClient } from '@/lib/test-utils';
import { server } from '@/mocks/server';
import { SignUp } from '@/pages/SignUp';
Expand Down

0 comments on commit 0afe4b7

Please sign in to comment.