Skip to content

Commit

Permalink
Merge pull request #13 from axiomhq/arne/make-user-pub
Browse files Browse the repository at this point in the history
Make `users::User` public
  • Loading branch information
bahlo authored Aug 8, 2022
2 parents e623e94 + 78d307d commit f878cd5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/users/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl Client {
}

/// Retrieve the authenticated user.
pub async fn current(&self) -> Result<AuthenticatedUser> {
pub async fn current(&self) -> Result<User> {
self.http_client.get("/v1/user").await?.json().await
}
}
1 change: 1 addition & 0 deletions src/users/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ mod client;
mod model;

pub use client::Client;
pub use model::*;
2 changes: 1 addition & 1 deletion src/users/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};

/// An authenticated Axiom user.
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug)]
pub struct AuthenticatedUser {
pub struct User {
pub id: String,
pub name: String,
pub emails: Vec<String>,
Expand Down

0 comments on commit f878cd5

Please # to comment.