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) {
try {
const response = await axiosApiInstance.put(`/api/vote/votedetail/${id}/`, updatedData);
return response.data;
} catch (error) {
console.error("Ошибка обновления голосования:", error);
throw error;
}
}
// async function updateVote(id, updatedData) {
// try {
// const response = await axiosApiInstance.put(`/api/vote/votedetail/${id}/`, updatedData);
// return response.data;
// } catch (error) {
// console.error("Ошибка обновления голосования:", error);
// throw error;
// }
// }
async function patchVote(id, partialData) {
try {
const response = await axiosApiInstance.patch(`/api/vote/votedetail/${id}/`, partialData);
return response.data;
} catch (error) {
console.error("Ошибка частичного обновления голосования:", error);
throw error;
}
}
// async function patchVote(id, partialData) {
// try {
// const response = await axiosApiInstance.patch(`/api/vote/votedetail/${id}/`, partialData);
// return response.data;
// } catch (error) {
// console.error("Ошибка частичного обновления голосования:", error);
// throw error;
// }
// }
async function deleteVote(id) {
try {
@@ -207,8 +207,8 @@ export {
getVotes,
createVote,
getVoteDetail,
updateVote,
patchVote,
// updateVote,
// patchVote,
deleteVote,
getEmployees,
getVoteResult,