-
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.
modified: frontend/src/components/common/Navbar.tsx
- Loading branch information
parkyugyeong
committed
Dec 30, 2024
1 parent
7718394
commit f3d74d4
Showing
5 changed files
with
106 additions
and
5 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,38 @@ | ||
import { jsonAxios } from "./axios.config.ts"; | ||
|
||
// 북마크 추가 | ||
export const postBookmark = async (resumeId: number) => { | ||
try { | ||
console.log("아이디", resumeId); | ||
const response = await jsonAxios.post(`/bookmarks/${resumeId}`); | ||
// 응답에서 bookmark_id를 받아옵니다 | ||
const bookmarkId = response.data.result.bookmark_id; | ||
return bookmarkId; | ||
} catch (error) { | ||
console.error("북마크 추가 오류:", error); | ||
throw error; | ||
} | ||
}; | ||
|
||
// 북마크 조회 | ||
export const getBookmarkById = async (userId: number) => { | ||
try { | ||
const response = await jsonAxios.get(`/bookmarks/users/${userId}`); | ||
return response.data; | ||
} catch (error) { | ||
console.error("북마크 조회 오류:", error); | ||
throw error; | ||
} | ||
}; | ||
|
||
// 북마크 삭제 | ||
export const deleteBookmarkById = async (bookmarkId: number) => { | ||
try { | ||
const response = await jsonAxios.delete(`/bookmarks/${bookmarkId}`); | ||
console.log("북마크 삭제 성공:", response.data); | ||
return response.data; | ||
} catch (error) { | ||
console.error("북마크 삭제 오류:", error); | ||
throw error; | ||
} | ||
}; |
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