This commit is contained in:
jooho
2021-10-26 09:42:40 +09:00
parent fd50dd78a0
commit 80e2e4e8b3
14 changed files with 256 additions and 40 deletions

View File

@@ -34,6 +34,8 @@ export const loginSerivce = {
if (result.status === 200) {
onSuccessLogin(await result.json())
resolve('success')
} if (result.status === 412) {
reject('join')
} else {
reject('noAuth')
}

View File

@@ -38,10 +38,19 @@ interface IUserUpdate extends IVerification {
userName: string
}
// 소셜 정보
export interface ISocialUser {
id: string
email: string
name: string
}
/**
* 사용자 관리 서비스
*/
export const userService = {
social: (provider: string, token: string) =>
axios.post(`${USER_URL}/social`, { provider, token }),
existsEmail: (email: string, userId?: string) =>
new Promise<boolean>((resolve, rejects) => {
axios