Skip to content

Commit

Permalink
Remove unused fn get_uid_from_request()
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsSR committed Nov 24, 2023
1 parent 27a5a8b commit 4e1fd80
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/api/ecdar_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,6 @@ async fn handle_session(
Ok(())
}

fn get_uid_from_request<T>(request: &Request<T>) -> Result<i32, Status> {
let uid = match request.metadata().get("uid").unwrap().to_str() {
Ok(uid) => uid,
Err(_) => {
return Err(Status::new(
Code::Internal,
"Could not get uid from request metadata",
));
}
};

Ok(uid.parse().unwrap())
}

fn is_valid_email(email: &str) -> bool {
Regex::new(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$")
.unwrap()
Expand Down

0 comments on commit 4e1fd80

Please sign in to comment.