fix: убрана лишняя "data"
This commit is contained in:
@@ -6,25 +6,25 @@ export const loadBoardDataAPI = async (boardId) => {
|
||||
|
||||
export const createTaskAPI = async (taskCateg, taskTitle, taskDescription) => {
|
||||
return axios.post('/api/boards/categories/tasks/create', {
|
||||
data: {category_id: taskCateg, title: taskTitle, description: taskDescription}
|
||||
category_id: taskCateg, title: taskTitle, description: taskDescription
|
||||
});
|
||||
};
|
||||
|
||||
export const createCategoryAPI = async (boardId, categTitle) => {
|
||||
return axios.post('/api/boards/categories/create', {
|
||||
data: {board_id: boardId, title: categTitle}
|
||||
board_id: boardId, title: categTitle
|
||||
});
|
||||
};
|
||||
|
||||
export const updateTaskAPI = async (editedTaskId, editedTaskMethod, editedTaskValue) => {
|
||||
return axios.put('/api/boards/categories/tasks/update', {
|
||||
data: {id: editedTaskId, update_method: editedTaskMethod, value: editedTaskValue}
|
||||
id: editedTaskId, update_method: editedTaskMethod, value: editedTaskValue
|
||||
});
|
||||
};
|
||||
|
||||
export const updateCategoryAPI = async (editedCategId, editedCategMethod, editedCategTitle) => {
|
||||
return axios.put('/api/boards/categories/update', {
|
||||
data: {id: editedCategId, update_method: editedCategMethod, value: editedCategTitle}
|
||||
id: editedCategId, update_method: editedCategMethod, value: editedCategTitle
|
||||
});
|
||||
};
|
||||
|
||||
@@ -42,19 +42,19 @@ export const deleteTaskAPI = async (taskId) => {
|
||||
|
||||
export const assignMemberAPI = async (editedTaskId, memberId) => {
|
||||
return axios.put('/api/boards/categories/tasks/assign', {
|
||||
data: {id: editedTaskId, member_id: memberId}
|
||||
id: editedTaskId, member_id: memberId
|
||||
});
|
||||
};
|
||||
|
||||
export const unassignMemberAPI = async (editedTaskId, memberId) => {
|
||||
return axios.put('/api/boards/categories/tasks/unassign', {
|
||||
data: {id: editedTaskId, member_id: memberId}
|
||||
id: editedTaskId, member_id: memberId
|
||||
});
|
||||
};
|
||||
|
||||
export const addMemberAPI = async (boardId, username) => {
|
||||
return axios.post('/api/boards/members/add', {
|
||||
data: {username: username, board_id: boardId}
|
||||
username: username, board_id: boardId
|
||||
});
|
||||
};
|
||||
|
||||
@@ -72,7 +72,7 @@ export const quitMemberAPI = async (boardId) => {
|
||||
|
||||
export const updateBoardsAPI = async (editedBoardId, editedBoardMethod, editedBoardValue) => {
|
||||
return axios.put('/api/boards/update', {
|
||||
data: {id: editedBoardId, update_method: editedBoardMethod, value: editedBoardValue}
|
||||
id: editedBoardId, update_method: editedBoardMethod, value: editedBoardValue
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user