-
Notifications
You must be signed in to change notification settings - Fork 7
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
MoimDetail 페이지에서 필요한 api 통신 연결
- Loading branch information
Showing
38 changed files
with
686 additions
and
112 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,9 @@ | ||
import ApiClient from './apiClient'; | ||
import { checkStatus } from './apiconfig'; | ||
|
||
export const deleteCancelChamyo = async (moimId: number) => { | ||
const response = await ApiClient.deleteWithAuth(`moim/${moimId}/comment`, { | ||
moimId, | ||
}); | ||
await checkStatus(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { TempMoimInputInfo } from '@_types/index'; | ||
import ApiClient from './apiClient'; | ||
import { checkStatus } from './apiconfig'; | ||
|
||
export const fetchCompleteMoin = async (moimId: number) => { | ||
const response = await ApiClient.patchWithAuth(`moim/${moimId}/complete`, { | ||
moimId, | ||
}); | ||
await checkStatus(response); | ||
}; | ||
|
||
export const fetchCancelMoin = async (moimId: number) => { | ||
const response = await ApiClient.patchWithAuth(`moim/${moimId}/cancel`, { | ||
moimId, | ||
}); | ||
await checkStatus(response); | ||
}; | ||
|
||
export const fetchModifyMoin = async ( | ||
moimId: number, | ||
state: TempMoimInputInfo, | ||
) => { | ||
const response = await ApiClient.patchWithAuth(`moim`, { | ||
moimId, | ||
...state, | ||
}); | ||
await checkStatus(response); | ||
}; | ||
|
||
export const fetchReopenMoin = async (moimId: number) => { | ||
const response = await ApiClient.patchWithAuth(`moim/${moimId}/reopen`, { | ||
moimId, | ||
}); | ||
await checkStatus(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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.