From 8f35113ec225a10d2e4dfd8cce0b1781babdf5c3 Mon Sep 17 00:00:00 2001 From: jisu Seo Date: Fri, 5 Jan 2024 12:47:07 +0900 Subject: [PATCH] =?UTF-8?q?Style:=20auth=20API=20=EC=88=9C=EC=84=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/auth.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/api/auth.ts b/src/api/auth.ts index d4ffa17c..a562c723 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -2,15 +2,21 @@ import client from './client'; // 인증 관련 API -// 회원가입 -export const postSignup = async (authData: AuthRequest) => { - const res = await client.post(`auth/signup`, authData); +// 이메일 중복 조회 +export const getCheckEmail = async (email: string) => { + const res = await client.get(`auth/emails/check/${email}`); return res; }; -// 로그아웃 -export const postLogout = async () => { - const res = await client.post(`auth/logout`); +// 닉네임 중복 조회 +export const getCheckNickname = async (nickname: string) => { + const res = await client.get(`auth/nicknames/check/${nickname}`); + return res; +}; + +// 회원가입 +export const postSignup = async (authData: AuthRequest) => { + const res = await client.post(`auth/signup`, authData); return res; }; @@ -26,14 +32,8 @@ export const postKakaoLogin = async (LoginData: LoginRequest) => { return res; }; -// 닉네임 중복 조회 -export const getCheckNickname = async (nickname: string) => { - const res = await client.get(`auth/nicknames/check/${nickname}`); - return res; -}; - -// 이메일 중복 조회 -export const getCheckEmail = async (email: string) => { - const res = await client.get(`auth/emails/check/${email}`); +// 로그아웃 +export const postLogout = async () => { + const res = await client.post(`auth/logout`); return res; };