A simple toll i created to learn some rust. It let's you create votings and add users where the admin is able to set the current active vote which the users will be able to vote to. The website can be cound at voting.0xfeedc0de.dev
docker build . -t gcr.io/sircremefresh/voting:v0.0.1
docker push gcr.io/sircremefresh/voting:v0.0.2
// TODO: implement 418 i am a tea pot
type Poll = { name: string description: string }
POST: /api/votings: { name: string polls: Poll[] } -> { votingId: string adminKey: string }
HEADER: AUTHENTICATION: string POST: /api/votings/{votingId}/user: { name: string } -> { userKey: string }
Schnittstelle um die aktive umfrage zu setzten HEADER: AUTHENTICATION: string PUT: /api/votings/{votingId}/polls/active: { pollIndex: number } -> { }
HEADER: AUTHENTICATION: string GET: /api/votings/{votingId}/polls: { votingId: string } -> { polls: Poll[] }
HEADER: AUTHENTICATION: string GET: /api/votings/{votingId}/polls/active: { } -> { pollIndex: number poll: Poll voted: boolean }
HEADER: AUTHENTICATION: string POST: /api/votings/{votingId}/polls/{pollIndex}/vote: { decision : 'YOP' | 'NOP' | 'NIL' } -> { } throws - 400 { reason: 'VOTED_ALREADY' | 'VOTE_NOT_ACTIVE' }
NOT_VOTED
ACCEPTED
DECLINED
DRAW