Skip to content

Commit

Permalink
EGCETSII#13-feat: Add update Voting endpoint
Browse files Browse the repository at this point in the history
Co-Authored-By: Fernando Rabasco Ledesma <[email protected]>
  • Loading branch information
Almafe2510 and ferrabled committed Jan 5, 2022
1 parent 9b0ee6f commit c368920
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions decide/administration/frontend/src/api/votingApiUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ const votingApi = {
deleteAllVotings: () => axios.delete(`/votings`),

startVotings:(
idList:number[]
idList:any[]
) =>
axios.put("/votings", {
idList: idList,
action: "start",
}),

stopVotings:(
idList:number[]
idList:any[]
) =>
axios.put("/votings", {
idList: idList,
action: "stop",
}),

tallyVotings:(
idList:number[]
idList:any[]
) =>
axios.put("/votings", {
idList: idList,
Expand All @@ -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}`),
};

Expand Down

0 comments on commit c368920

Please sign in to comment.