🥅 CFixed ValidationError in github.py
This commit is contained in:
+36
-34
@@ -1,3 +1,5 @@
|
|||||||
|
from typing import Optional
|
||||||
|
|
||||||
import authlib.integrations.base_client
|
import authlib.integrations.base_client
|
||||||
from fastapi import APIRouter, Request, HTTPException, Response
|
from fastapi import APIRouter, Request, HTTPException, Response
|
||||||
from classquiz.config import settings
|
from classquiz.config import settings
|
||||||
@@ -24,43 +26,43 @@ class Plan(BaseModel):
|
|||||||
class GitHubOauthResponse(BaseModel):
|
class GitHubOauthResponse(BaseModel):
|
||||||
login: str
|
login: str
|
||||||
id: int
|
id: int
|
||||||
node_id: str
|
node_id: Optional[str]
|
||||||
avatar_url: str
|
avatar_url: Optional[str]
|
||||||
gravatar_id: str
|
gravatar_id: Optional[str]
|
||||||
url: str
|
url: Optional[str]
|
||||||
html_url: str
|
html_url: Optional[str]
|
||||||
followers_url: str
|
followers_url: Optional[str]
|
||||||
following_url: str
|
following_url: Optional[str]
|
||||||
gists_url: str
|
gists_url: Optional[str]
|
||||||
starred_url: str
|
starred_url: Optional[str]
|
||||||
subscriptions_url: str
|
subscriptions_url: Optional[str]
|
||||||
organizations_url: str
|
organizations_url: Optional[str]
|
||||||
repos_url: str
|
repos_url: Optional[str]
|
||||||
events_url: str
|
events_url: Optional[str]
|
||||||
received_events_url: str
|
received_events_url: Optional[str]
|
||||||
type: str
|
type: Optional[str]
|
||||||
site_admin: bool
|
site_admin: Optional[str]
|
||||||
name: str
|
name: Optional[str]
|
||||||
company: None
|
company: Optional[str]
|
||||||
blog: str
|
blog: Optional[str]
|
||||||
location: str
|
location: Optional[str]
|
||||||
email: str
|
email: str
|
||||||
hireable: None
|
hireable: Optional[bool]
|
||||||
bio: str
|
bio: Optional[str]
|
||||||
twitter_username: str
|
twitter_username: Optional[str]
|
||||||
public_repos: int
|
public_repos: Optional[int]
|
||||||
public_gists: int
|
public_gists: Optional[int]
|
||||||
followers: int
|
followers: Optional[int]
|
||||||
following: int
|
following: Optional[int]
|
||||||
created_at: datetime
|
created_at: datetime
|
||||||
updated_at: datetime
|
updated_at: datetime
|
||||||
private_gists: int
|
private_gists: Optional[int]
|
||||||
total_private_repos: int
|
total_private_repos: Optional[int]
|
||||||
owned_private_repos: int
|
owned_private_repos: Optional[int]
|
||||||
disk_usage: int
|
disk_usage: Optional[int]
|
||||||
collaborators: int
|
collaborators: Optional[int]
|
||||||
two_factor_authentication: bool
|
two_factor_authentication: Optional[bool]
|
||||||
plan: Plan
|
plan: Optional[Plan]
|
||||||
|
|
||||||
|
|
||||||
@router.get("/login")
|
@router.get("/login")
|
||||||
|
|||||||
Reference in New Issue
Block a user