fix(user): fill with empty data in graph data to show correct graph

This commit is contained in:
MingxuanGame
2025-08-13 04:18:00 +00:00
parent 69e9927ea0
commit 29eb85bc4a
2 changed files with 12 additions and 0 deletions

View File

@@ -74,5 +74,7 @@ class RankHistoryResp(BaseModel):
)
).all()
data = [result.rank for result in results]
if len(data) != 90:
data.extend([0] * (90 - len(data)))
data.reverse()
return cls(mode=mode, data=data)