diff --git a/src/components/ProfileHeader/ProfileHeader.js b/src/components/ProfileHeader/ProfileHeader.js index ad8c199c..2dcf8003 100644 --- a/src/components/ProfileHeader/ProfileHeader.js +++ b/src/components/ProfileHeader/ProfileHeader.js @@ -25,7 +25,7 @@ export const ProfileHeader = () => { const [isLoggingOut, setIsLoggingOut] = useState(false); useEffect(() => { - apiRequest(`/api/profile/${localStorage.getItem('cardId')}`) + apiRequest(`/profile/${localStorage.getItem('cardId')}`) .then((profileInfo) => dispatch(setProfileInfo(profileInfo)) ); diff --git a/src/pages/FormPage.js b/src/pages/FormPage.js index 1c525ded..e637ae0b 100644 --- a/src/pages/FormPage.js +++ b/src/pages/FormPage.js @@ -33,7 +33,7 @@ const FormPage = () => { }; if (!candidate.id) { - apiRequest('/api/profile', { + apiRequest('/profile', { params: Number(params.id) }) .then((el) => dispatch(currentCandidate(el)))