-
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.
- Loading branch information
Showing
4 changed files
with
56 additions
and
8 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
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 |
---|---|---|
@@ -1,10 +1,54 @@ | ||
import client from "../client"; | ||
|
||
// 경험 목록 조회 | ||
export const getAllExperienceList = async (token: string) => { | ||
return await client.get(`/api/experiences`, { | ||
// 북마크 된 경험 목록 조회 | ||
export const getAllExperienceList = async (jdId: string, token: string) => { | ||
return await client.get(`/api/experiences/bookmark/${jdId}`, { | ||
headers: { | ||
Authorization: `Bearer ${token}`, | ||
}, | ||
}); | ||
}; | ||
|
||
// 경험 목록 검색 - 텍스트 검색 | ||
export const searchTextExperienceList = async ( | ||
jdId: string, | ||
searchText: string, | ||
token: string | ||
) => { | ||
return await client.get( | ||
`/api/experiences/bookmark/${jdId}?search=${searchText}`, | ||
{ | ||
headers: { | ||
Authorization: `Bearer ${token}`, | ||
}, | ||
} | ||
); | ||
}; | ||
|
||
// 경험 목록 검색 - 태그필터링 | ||
export const searchTagExperienceList = async ( | ||
jdId: string, | ||
parentTag: string, | ||
childTag: string | null, | ||
token: string | ||
) => { | ||
if (childTag) { | ||
return await client.get( | ||
`/api/experiences/bookmark/${jdId}?parent-tag=${parentTag}&child-tag=${childTag}`, | ||
{ | ||
headers: { | ||
Authorization: `Bearer ${token}`, | ||
}, | ||
} | ||
); | ||
} else { | ||
return await client.get( | ||
`/api/experiences/bookmark/${jdId}?parent-tag=${parentTag}`, | ||
{ | ||
headers: { | ||
Authorization: `Bearer ${token}`, | ||
}, | ||
} | ||
); | ||
} | ||
}; |