-
Notifications
You must be signed in to change notification settings - Fork 2
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 #146 from Garodden/hotfix/user
Feat: User API 수정
- Loading branch information
Showing
7 changed files
with
31 additions
and
23 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
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ import FollowInfo from "@/components/FollowInfo"; | |
import MyResumes from "@/components/MyResumes"; | ||
import { anchorScrollCallback } from "@/utils/common"; | ||
import { saveProfileReqParam } from "@/utils/Parameter"; | ||
import { fetchUserProfile, saveProfile } from "@/utils/API"; | ||
import { fetchLoginUserProfile, saveProfile } from "@/utils/API"; | ||
|
||
const MyPage = () => { | ||
//Mypage, UserPage는 유저 정보를 통해 pageOwner인지 판단한 후 구별이 가능 | ||
|
@@ -28,7 +28,7 @@ const MyPage = () => { | |
const [file, setFile] = useState(null); | ||
|
||
useEffect(() =>{ | ||
fetchUserProfile("[email protected]") | ||
fetchLoginUserProfile() | ||
.then(async (userInfo) => { | ||
setUsername(userInfo.realName); | ||
setIdentity(userInfo.identity); | ||
|
@@ -46,7 +46,7 @@ const MyPage = () => { | |
|
||
//프로필 변경 사항 저장 API | ||
const doSaveProfile = () =>{ | ||
const reqParam = saveProfileReqParam("[email protected]", identity, location, description, file); | ||
const reqParam = saveProfileReqParam(identity, location, description, file); | ||
|
||
saveProfile(reqParam) | ||
.then((response) => { | ||
|
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ const Resign = () => { | |
|
||
const handleResign = () => { | ||
//가데이터 | ||
const reqParam = withdrawReqParam("[email protected]", currentPassword, true); | ||
const reqParam = withdrawReqParam(currentPassword, true); | ||
|
||
withdraw(reqParam) | ||
.then((response) => { | ||
|
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 |
---|---|---|
|
@@ -78,7 +78,7 @@ const Signup = () =>{ | |
} | ||
|
||
const doLogin = () =>{ | ||
nevigate("/"); | ||
nevigate("/login"); | ||
}; | ||
|
||
return ( | ||
|
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ import ChatBox from "@/components/ChatBox"; | |
import FollowInfo from "@/components/FollowInfo"; | ||
import MyResumes from "@/components/MyResumes"; | ||
import UserPage from "./UserPage"; | ||
import { fetchUserProfile, saveProfile, withdraw } from "@/utils/API"; | ||
import { fetchLoginUserProfile, saveProfile, withdraw } from "@/utils/API"; | ||
import { saveProfileReqParam, withdrawReqParam } from "@/utils/Parameter"; | ||
|
||
|
||
|
@@ -37,19 +37,19 @@ const Test = () => { | |
|
||
const userProfileDemo = () =>{ | ||
|
||
fetchUserProfile(email) | ||
fetchLoginUserProfile() | ||
.then((data) => {console.log(data)}); | ||
} | ||
|
||
const userWithdraw = (bool) =>{ | ||
const reqParam = withdrawReqParam("[email protected]", "Dlxogml!135", bool); | ||
const reqParam = withdrawReqParam("Dlxogml!135", bool); | ||
|
||
withdraw(reqParam) | ||
.then(data => console.log(data)); | ||
} | ||
|
||
const saveUserProfile = () =>{ | ||
const reqParam = saveProfileReqParam(email, "123","서울","ㄷㅈ매럊믇ㄹ",file); | ||
const reqParam = saveProfileReqParam("123","서울","ㄷㅈ매럊믇ㄹ",file); | ||
|
||
saveProfile(reqParam) | ||
.then(response => console.log(response)); | ||
|
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