Payouts fees changes (#478)

* Payouts fees changes

* Update src/queue/payouts.rs

Co-authored-by: triphora <emmaffle@modrinth.com>

Co-authored-by: triphora <emmaffle@modrinth.com>
This commit is contained in:
Geometrically
2022-11-16 13:46:36 -07:00
committed by GitHub
parent ecc500fc91
commit da19a07943
9 changed files with 141 additions and 39 deletions

View File

@@ -260,7 +260,7 @@ pub async fn add_team_member(
));
}
if new_member.payouts_split < Decimal::from(0)
if new_member.payouts_split < Decimal::ZERO
|| new_member.payouts_split > Decimal::from(5000)
{
return Err(ApiError::InvalidInput(
@@ -425,8 +425,7 @@ pub async fn edit_team_member(
}
if let Some(payouts_split) = edit_member.payouts_split {
if payouts_split < Decimal::from(0)
|| payouts_split > Decimal::from(5000)
if payouts_split < Decimal::ZERO || payouts_split > Decimal::from(5000)
{
return Err(ApiError::InvalidInput(
"Payouts split must be between 0 and 5000!".to_string(),