Skip to content

Commit

Permalink
fix(auditor): discord id cannot be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin authored and joshuef committed May 22, 2024
1 parent 97607a4 commit 80eeefd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sn_auditor/src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ pub(crate) fn add_participant(
return Ok(
Response::from_string("discord_id cannot be more than 32 chars").with_status_code(400),
);
} else if discord_id.chars().count() == 0 {
return Ok(Response::from_string("discord_id cannot be empty").with_status_code(400));
}

if let Err(err) = track_new_participant(dag, discord_id.to_owned()) {
Expand Down

0 comments on commit 80eeefd

Please sign in to comment.