Skip to content

Commit

Permalink
fix: removed unneeded fields in GithubUser
Browse files Browse the repository at this point in the history
  • Loading branch information
sargon64 committed Jul 31, 2023
1 parent 9d4f0bd commit 85a0682
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ pub async fn user_auth(
github_id: Set(github_user.id as i32),
username: Set(github_user.login),
email: Set(github_user.email),
bio: Set(Some(github_user.bio)),
avatar: Set(Some(github_user.avatar_url)),
bio: Set(github_user.bio),
avatar: Set(github_user.avatar_url),
permissions: Set(7),
..Default::default()
};
Expand All @@ -218,14 +218,9 @@ pub async fn user_auth(

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GithubUser {
pub avatar_url: String,
pub bio: String,
pub blog: String,
pub avatar_url: Option<String>,
pub bio: Option<String>,
pub email: String,
pub id: i64,
pub login: String,
pub name: Option<String>,
pub twitter_username: String,
pub updated_at: DateTime<Utc>,
pub url: String,
}

0 comments on commit 85a0682

Please sign in to comment.