Skip to content

Commit

Permalink
Merge tag 'v1.0.1' into develop
Browse files Browse the repository at this point in the history
Hotfix: list API에서 민감 개인 정보 제거
  • Loading branch information
minkyu97 committed Jul 6, 2024
2 parents f893818 + 03f923e commit 03abedc
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion waffledotcom/src/apps/user/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,39 @@ def from_orm(position: Position) -> PositionDto:
)


class SimpleUserResponse(BaseModel):
id: int
username: str | None
first_name: str
last_name: str
image_url: str | None = None
positions: list[PositionDto]
github_id: str | None
slack_id: str | None
introduction: str | None

@staticmethod
def from_orm(user: User) -> SimpleUserResponse:
return SimpleUserResponse(
id=user.id,
username=user.username,
first_name=user.first_name,
last_name=user.last_name,
image_url=user.image_url,
positions=[PositionDto.from_orm(pos) for pos in user.positions],
github_id=user.github_id,
slack_id=user.slack_id,
introduction=user.introduction,
)


class UserDetailResponse(BaseModel):
id: int
sso_id: str | None
username: str | None
first_name: str
image_url: str | None = None
last_name: str
image_url: str | None = None
positions: list[PositionDto]
department: str | None
college: str | None
Expand Down

0 comments on commit 03abedc

Please sign in to comment.