-
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.
Browse files
Browse the repository at this point in the history
* feat : 커리큘럼 api 수정 * feat : 변수명 변경
- Loading branch information
1 parent
765b671
commit e000e15
Showing
2 changed files
with
36 additions
and
0 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,19 @@ | ||
import { fetcher } from '@/app/api/fetcher'; | ||
import { CurriculumItemsDto } from '@/types'; | ||
|
||
const curriculumFetcher = fetcher(); | ||
|
||
const postCurriculumFetch = (studyId: number, curriculum: CurriculumItemsDto) => { | ||
curriculumFetcher(`/studies/${studyId}/curriculums`, { | ||
method: 'POST', | ||
body: curriculum, | ||
}); | ||
}; | ||
|
||
const patchCurriculumFetch = (curriculumId: number, ParticipantId: number) => { | ||
curriculumFetcher(`/curriculums/${curriculumId}/${ParticipantId}/check`, { | ||
method: 'PATCH', | ||
}); | ||
}; | ||
|
||
export { postCurriculumFetch, patchCurriculumFetch }; |
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