-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from prgrms-web-devcourse-final-project/featurโฆ
โฆe/loginApi Feat: ๋ก๊ทธ์ธ,ํ์๊ฐ์ ,๋น๋ฐ๋ฒํธ์ฐพ๊ธฐ,๋ฆฌ์ ,ํ์ฌ๋น๋ฐ๋ฒํธ ํ์ธ, ๋๋ค๋ณ๊ฒฝ api ๋ก์ง ์ถ๊ฐ
- Loading branch information
Showing
8 changed files
with
210 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import axiosInstance from './axiosInstance'; | ||
|
||
export const postSignUp = async (body: { | ||
email: string; | ||
password: string; | ||
password_confirm: string; | ||
name: string; | ||
phone: string; | ||
}) => { | ||
const response = await axiosInstance.post(`/users/checkemail`, body); | ||
|
||
return response.data; | ||
}; | ||
|
||
export const postSignIn = async (body: { email: string; password: string }) => { | ||
const response = await axiosInstance.post(`/users/login`, body); | ||
|
||
return response.data; | ||
}; | ||
|
||
export const postFindPassword = async (body: { email: string }) => { | ||
const response = await axiosInstance.post(`/users/find`, body); | ||
|
||
return response.data; | ||
}; | ||
|
||
export const postResetPassword = async ( | ||
body: { newPassword: string }, | ||
token: string | ||
) => { | ||
const response = await axiosInstance.post( | ||
`/users/reset?token=${token}`, | ||
body | ||
); | ||
|
||
return response.data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import axiosInstance from './axiosInstance'; | ||
|
||
export const postPasswordVerify = async (body: { currentPassword: string }) => { | ||
const response = await axiosInstance.post(`/mypage/verfiy`, body); | ||
|
||
return response.data; | ||
}; | ||
|
||
export const postPasswordChange = async (body: { newPassword: string }) => { | ||
const response = await axiosInstance.post(`/mypage/change`, body); | ||
|
||
return response.data; | ||
}; | ||
|
||
export const postLocationChange = async (body: { newAddress: string }) => { | ||
const response = await axiosInstance.post(`/mypage/changeneighbor`, body); | ||
|
||
return response.data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters