Fix another GitHub OAuth Bug, allow users to register with null names. (#69)

* Change header name

* Add default bio value

* Remove default

* Make name null

* Run prepare
This commit is contained in:
Geometrically 2020-10-03 16:31:10 -07:00 committed by GitHub
parent da654fdff5
commit 68ee2bdcdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 6 deletions

View File

@ -0,0 +1,5 @@
-- Add migration script here
ALTER TABLE users
ALTER COLUMN name DROP NOT NULL;
ALTER TABLE users
ALTER COLUMN name DROP DEFAULT;

View File

@ -801,7 +801,7 @@
},
"nullable": [
true,
false,
true,
true,
true,
false,
@ -1327,7 +1327,7 @@
},
"nullable": [
false,
false,
true,
true,
true,
false,

View File

@ -23,7 +23,7 @@ pub struct GitHubUser {
pub login: String,
pub id: u64,
pub avatar_url: String,
pub name: String,
pub name: Option<String>,
pub email: Option<String>,
pub bio: Option<String>,
}

View File

@ -4,7 +4,7 @@ pub struct User {
pub id: UserId,
pub github_id: Option<i64>,
pub username: String,
pub name: String,
pub name: Option<String>,
pub email: Option<String>,
pub avatar_url: Option<String>,
pub bio: Option<String>,
@ -31,7 +31,7 @@ impl User {
self.id as UserId,
self.github_id,
&self.username,
&self.name,
self.name.as_ref(),
self.email.as_ref(),
self.avatar_url.as_ref(),
self.bio.as_ref(),

View File

@ -11,7 +11,7 @@ pub struct User {
pub id: UserId,
pub github_id: Option<u64>,
pub username: String,
pub name: String,
pub name: Option<String>,
pub email: Option<String>,
pub avatar_url: Option<String>,
pub bio: Option<String>,