Skip to content

Commit

Permalink
add prediction type
Browse files Browse the repository at this point in the history
  • Loading branch information
pscott committed May 16, 2024
1 parent 709c3c8 commit 0270678
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,13 @@ impl TryFrom<BoostQueryBoostStrategyEligibility> for BoostEligibility {
.parse()
.map_err(|_| "failed to parse choice")?;
if choice == 0 {
// A choice of `0` indicates that the winning choice should be bribed
Ok(BoostEligibility::BribeWinningOutcome)
// Error
Err("choice cannot be 0")
} else {
Ok(BoostEligibility::Bribe(choice))
}
}
"prediction" => Ok(BoostEligibility::BribeWinningOutcome),
_ => Err("invalid eligibility"),
}
}
Expand Down

0 comments on commit 0270678

Please sign in to comment.