Skip to content

Commit

Permalink
fix(group): require > 1 use count on invites
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Jul 8, 2024
1 parent a7d0f2a commit 02a8e67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions svc/api/group/src/route/groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,11 +973,11 @@ pub async fn create_invite(
);

if let Some(ttl) = body.ttl {
ensure!(ttl >= 0, "invalid parameter `ttl`");
ensure!(ttl > 0, "invalid parameter `ttl`");
ensure!(ttl <= util::duration::days(30), "parameter `ttl` too large");
}
if let Some(use_count) = body.use_count {
ensure!(use_count >= 0, "invalid parameter `use_count`");
ensure!(use_count > 0, "invalid parameter `use_count`");
ensure!(use_count <= 5000, "parameter `use_count` too large");
}

Expand Down

0 comments on commit 02a8e67

Please sign in to comment.