+# Unreleased
+
+New feature: Eliminated candidates
+
+
# 0.2.6 (November 23, 2022)
Add license, README, and Changelog
{
return Err(cgi::text_response(415, "Invalid vote"));
}
+ let elim =
+ read_elim_list(dir).map_err(|_| cgi::text_response(503, "Couldn't read eliminations"))?;
+ if elim.contains(
+ std::str::from_utf8(&body[2..]).map_err(|_| cgi::text_response(415, "Vote not UTF-8"))?,
+ ) {
+ return Err(cgi::text_response(403, "Candidate eliminated"));
+ }
write_vote(dir, get_voter(request)?, body)
.map_err(|_| cgi::text_response(503, "Couldn't record vote"))?;
Ok(cgi::text_response(200, "Vote recorded"))