Skip to content

Commit

Permalink
Merge pull request #194 from YAPP-Github/feature/api-name-change
Browse files Browse the repository at this point in the history
fix: login.ts -> user.ts 변경
  • Loading branch information
Jeong-jeong authored Jul 30, 2022
2 parents 4c9e593 + 39380b6 commit d21d820
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/header/MenuBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { palette } from '@/lib/styles/palette';
import styled from 'styled-components';
import DatingInfoBox from './DatingInfoBox';
import MeetingInfoBox from './MeetingInfoBox';
import { postLogout, postWithdrawal } from '@/lib/api/login';
import { postLogout, postWithdrawal } from '@/lib/api/user';
import { useToggle } from '@/hooks/common';
import { Modal } from '../base';
interface MenuBlockProps {
Expand Down
5 changes: 0 additions & 5 deletions src/lib/api/login.ts → src/lib/api/user.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import apiClient from './index';
import { LoginResponse, LoginRequest, KakaoIdResponse } from '@/types/user';
/*
@desc
임시 아이디 비번: test1
*/

export const postJoin = async (payload: LoginRequest): Promise<LoginResponse | undefined> => {
const res = await apiClient.post('/join', payload);
Expand All @@ -21,7 +17,6 @@ export const getKakaoId = async () => {
return res.data;
};

/* @FIXME: 나중에 user.ts로 바꾸기 */
export const postLogout = async () => {
const res = await apiClient.post('/logout');
return res.data;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/TestLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Title } from '@/lib/styles/styledComponents';
import { palette } from '@/lib/styles/palette';
import { LoginForm } from '@/components/testLogin';
import { LoginRequest } from '@/types/user';
import { postLogin } from '@/lib/api/login';
import { postLogin } from '@/lib/api/user';
import Cookies from 'js-cookie';
import { useNavigate } from 'react-router-dom';
import { useToggle } from '@/hooks/common';
Expand Down

0 comments on commit d21d820

Please sign in to comment.