Skip to content

Commit

Permalink
Fix getting users by ID
Browse files Browse the repository at this point in the history
  • Loading branch information
InAnYan committed Sep 17, 2024
1 parent f131cbd commit a20453c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl std::fmt::Display for UserRef {
match self {
UserRef::ByString(str) => write!(f, "{}", str),

UserRef::ById(id) => write!(f, "{}", id),
UserRef::ById(id) => write!(f, "user/{}", id),
}
}
}
Expand All @@ -44,7 +44,7 @@ impl<'octo> UserHandler<'octo> {
/// Get this users profile info
pub async fn profile(&self) -> crate::Result<crate::models::UserProfile> {
// build the route to get info on this user
let route = format!("/users/{}", self.user);
let route = format!("/{}", self.user);
// get info on the specified user
self.crab.get(route, None::<&()>).await
}
Expand Down

0 comments on commit a20453c

Please sign in to comment.