function castVote
castVote(
dumpId: string,
userId: string
): VoteResult

Records userId's upvote on a dump and notifies the dump's poster. The notification is best-effort: if it fails, the vote still counts.

Parameters

dumpId: string
userId: string

Return Type

Throws

APIException

404 when the dump doesn't exist or is someone else's private dump, 409 when the user already voted for it.

Usage

import { castVote } from "api/services/vote-service.ts";