mirror of
https://github.com/r-ca/kidshift-web.git
synced 2024-10-26 00:34:01 +00:00
fix
This commit is contained in:
parent
aac2df4476
commit
8921f8bac5
|
@ -39,7 +39,7 @@ export const getTaskList = async (): Promise<TaskListResponse> => {
|
||||||
export const completeTask = async (taskId: string, childId: string): Promise<void> => {
|
export const completeTask = async (taskId: string, childId: string): Promise<void> => {
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
params.append('childId', childId);
|
params.append('childId', childId);
|
||||||
const response = await api.post(`/task/${taskId}/complete`, params);
|
const response = await api.post(`/task/${taskId}/complete`, {}, { params });
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200) {
|
||||||
throw new Error('タスクの完了に失敗しました');
|
throw new Error('タスクの完了に失敗しました');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user