mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-27 06:47:10 +02:00
First public commit
This commit is contained in:
commit
e05cd62e53
228 changed files with 17717 additions and 0 deletions
15
api-client/update-participant.ts
Normal file
15
api-client/update-participant.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import axios from "axios";
|
||||
|
||||
export interface UpdateParticipantPayload {
|
||||
pollId: string;
|
||||
participantId: string;
|
||||
name: string;
|
||||
votes: string[];
|
||||
}
|
||||
|
||||
export const updateParticipant = async (
|
||||
payload: UpdateParticipantPayload,
|
||||
): Promise<void> => {
|
||||
const { pollId, participantId, ...body } = payload;
|
||||
await axios.patch(`/api/poll/${pollId}/participant/${participantId}`, body);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue