Skip to content

Commit

Permalink
name added in auth user schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
nrjadkry committed Jul 10, 2024
1 parent 34295b2 commit 2ea7755
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/backend/app/users/user_schemas.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
from pydantic import BaseModel, EmailStr, ValidationInfo, Field
from pydantic.functional_validators import field_validator
from typing import Optional
from app.models.enums import UserRole


class AuthUser(BaseModel):
"""The user model returned from Google OAuth2."""

id: str
email: EmailStr
name: str
img_url: Optional[str] = None


Expand Down Expand Up @@ -85,3 +87,4 @@ class ProfileUpdate(BaseModel):
drone_you_own: Optional[str]
experience_years: Optional[int]
certified_drone_operator: Optional[bool]
role: Optional[UserRole] = UserRole.DRONE_PILOT

0 comments on commit 2ea7755

Please sign in to comment.