From da654fdff5f9145f0a938ca5d1d2dbc689727ca8 Mon Sep 17 00:00:00 2001 From: Geometrically <18202329+Geometrically@users.noreply.github.com> Date: Sat, 3 Oct 2020 12:11:36 -0700 Subject: [PATCH] Add default bio value, to fix GitHub integration errors (#68) * Change header name * Add default bio value * Remove default --- src/auth/mod.rs | 2 +- src/routes/auth.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auth/mod.rs b/src/auth/mod.rs index 1384c5f60..85383f233 100644 --- a/src/auth/mod.rs +++ b/src/auth/mod.rs @@ -25,7 +25,7 @@ pub struct GitHubUser { pub avatar_url: String, pub name: String, pub email: Option, - pub bio: String, + pub bio: Option, } pub async fn get_github_user_from_token( diff --git a/src/routes/auth.rs b/src/routes/auth.rs index d6344e0b4..83c4442e2 100644 --- a/src/routes/auth.rs +++ b/src/routes/auth.rs @@ -187,7 +187,7 @@ pub async fn auth_callback( name: user.name, email: user.email, avatar_url: Some(user.avatar_url), - bio: Some(user.bio), + bio: user.bio, created: Utc::now(), role: Role::Developer.to_string(), }