Update axios-api.js

This commit is contained in:
Nukeap committed 2025-01-22 11:23:57 +03:00
1 parent 0c00f56be6
commit fc89e95209
1 file changed
+20 -20
+20 -20
View File
@@ -146,25 +146,25 @@ async function getVoteDetail(id) {
} }
} }
async function updateVote(id, updatedData) { // async function updateVote(id, updatedData) {
try { // try {
const response = await axiosApiInstance.put(`/api/vote/votedetail/${id}/`, updatedData); // const response = await axiosApiInstance.put(`/api/vote/votedetail/${id}/`, updatedData);
return response.data; // return response.data;
} catch (error) { // } catch (error) {
console.error("Ошибка обновления голосования:", error); // console.error("Ошибка обновления голосования:", error);
throw error; // throw error;
} // }
} // }
async function patchVote(id, partialData) { // async function patchVote(id, partialData) {
try { // try {
const response = await axiosApiInstance.patch(`/api/vote/votedetail/${id}/`, partialData); // const response = await axiosApiInstance.patch(`/api/vote/votedetail/${id}/`, partialData);
return response.data; // return response.data;
} catch (error) { // } catch (error) {
console.error("Ошибка частичного обновления голосования:", error); // console.error("Ошибка частичного обновления голосования:", error);
throw error; // throw error;
} // }
} // }
async function deleteVote(id) { async function deleteVote(id) {
try { try {
@@ -207,8 +207,8 @@ export {
getVotes, getVotes,
createVote, createVote,
getVoteDetail, getVoteDetail,
updateVote, // updateVote,
patchVote, // patchVote,
deleteVote, deleteVote,
getEmployees, getEmployees,
getVoteResult, getVoteResult,