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:
parent
da654fdff5
commit
68ee2bdcdc
5
migrations/20201003211651_make-name-null.sql
Normal file
5
migrations/20201003211651_make-name-null.sql
Normal 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;
|
||||||
@ -801,7 +801,7 @@
|
|||||||
},
|
},
|
||||||
"nullable": [
|
"nullable": [
|
||||||
true,
|
true,
|
||||||
false,
|
true,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
@ -1327,7 +1327,7 @@
|
|||||||
},
|
},
|
||||||
"nullable": [
|
"nullable": [
|
||||||
false,
|
false,
|
||||||
false,
|
true,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
|||||||
@ -23,7 +23,7 @@ pub struct GitHubUser {
|
|||||||
pub login: String,
|
pub login: String,
|
||||||
pub id: u64,
|
pub id: u64,
|
||||||
pub avatar_url: String,
|
pub avatar_url: String,
|
||||||
pub name: String,
|
pub name: Option<String>,
|
||||||
pub email: Option<String>,
|
pub email: Option<String>,
|
||||||
pub bio: Option<String>,
|
pub bio: Option<String>,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ pub struct User {
|
|||||||
pub id: UserId,
|
pub id: UserId,
|
||||||
pub github_id: Option<i64>,
|
pub github_id: Option<i64>,
|
||||||
pub username: String,
|
pub username: String,
|
||||||
pub name: String,
|
pub name: Option<String>,
|
||||||
pub email: Option<String>,
|
pub email: Option<String>,
|
||||||
pub avatar_url: Option<String>,
|
pub avatar_url: Option<String>,
|
||||||
pub bio: Option<String>,
|
pub bio: Option<String>,
|
||||||
@ -31,7 +31,7 @@ impl User {
|
|||||||
self.id as UserId,
|
self.id as UserId,
|
||||||
self.github_id,
|
self.github_id,
|
||||||
&self.username,
|
&self.username,
|
||||||
&self.name,
|
self.name.as_ref(),
|
||||||
self.email.as_ref(),
|
self.email.as_ref(),
|
||||||
self.avatar_url.as_ref(),
|
self.avatar_url.as_ref(),
|
||||||
self.bio.as_ref(),
|
self.bio.as_ref(),
|
||||||
|
|||||||
@ -11,7 +11,7 @@ pub struct User {
|
|||||||
pub id: UserId,
|
pub id: UserId,
|
||||||
pub github_id: Option<u64>,
|
pub github_id: Option<u64>,
|
||||||
pub username: String,
|
pub username: String,
|
||||||
pub name: String,
|
pub name: Option<String>,
|
||||||
pub email: Option<String>,
|
pub email: Option<String>,
|
||||||
pub avatar_url: Option<String>,
|
pub avatar_url: Option<String>,
|
||||||
pub bio: Option<String>,
|
pub bio: Option<String>,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user