function broadcastVoteUpdate
broadcastVoteUpdate(
dumpId: string,
voteCount: number,
voterId: string,
action: "cast" | "remove",
onlyUserId?: string
): void

Sends votes_update after the route stored a vote, to everyone, or with onlyUserId to that user's sockets alone (for a private dump).

Parameters

dumpId: string
voteCount: number
voterId: string
action: "cast" | "remove"
optional
onlyUserId: string

Return Type

void

Usage

import { broadcastVoteUpdate } from "api/services/ws-service.ts";