Skip to content

Commit

Permalink
style: update head icon model
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Mar 28, 2024
1 parent 21eb9a9 commit d2f1956
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions models/head_icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ class HeadIcon(BaseModel):
icons: List[str]

@property
def icon(self) -> str:
for icon in self.icons:
if icon:
return icon
def webp(self) -> str:
return self.icons[0]

@property
def png(self) -> str:
return self.icons[1]


# 原始数据


class ForHash(BaseModel):
Hash: str

Expand Down

0 comments on commit d2f1956

Please sign in to comment.