From c368920ef906f88f728542fa749891aa4bf1b7f2 Mon Sep 17 00:00:00 2001 From: almafe2510 Date: Wed, 5 Jan 2022 01:06:37 +0100 Subject: [PATCH] #13-feat: Add update Voting endpoint Co-Authored-By: Fernando Rabasco Ledesma <48551658+ferrabled@users.noreply.github.com> --- decide/administration/frontend/src/api/votingApiUtils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/decide/administration/frontend/src/api/votingApiUtils.ts b/decide/administration/frontend/src/api/votingApiUtils.ts index bde6361ede..adc3433ff3 100644 --- a/decide/administration/frontend/src/api/votingApiUtils.ts +++ b/decide/administration/frontend/src/api/votingApiUtils.ts @@ -24,7 +24,7 @@ const votingApi = { deleteAllVotings: () => axios.delete(`/votings`), startVotings:( - idList:number[] + idList:any[] ) => axios.put("/votings", { idList: idList, @@ -32,7 +32,7 @@ const votingApi = { }), stopVotings:( - idList:number[] + idList:any[] ) => axios.put("/votings", { idList: idList, @@ -40,7 +40,7 @@ const votingApi = { }), tallyVotings:( - idList:number[] + idList:any[] ) => axios.put("/votings", { idList: idList, @@ -50,6 +50,7 @@ const votingApi = { //Individual Operations getVoting: (voting_id: number) => axios.get(`/votings/${voting_id}`), createVoting: (voting: Voting) => axios.post("/votings", voting), + updateVoting: (voting: Voting, voting_id: number) => axios.put(`/votings/${voting_id}`, voting), deleteVoting: (voting_id: number) => axios.delete(`/votings/${voting_id}`), };