feat(achievements): add some achievements

This commit is contained in:
MingxuanGame
2025-08-21 14:25:26 +00:00
parent 1104ff6c54
commit 68e41126cd
6 changed files with 1024 additions and 3 deletions

View File

@@ -87,9 +87,7 @@ async def process_achievements(session: AsyncSession, redis: Redis, score_id: in
type=EventType.ACHIEVEMENT,
user_id=score.user_id,
event_payload={
"achievement": UserAchievementResp(
achievement_id=r.id, achieved_at=now
).model_dump(),
"achievement": {"achievement_id": r.id, "achieved_at": now.isoformat()},
"user": {
"username": score.user.username,
"url": settings.web_url + "users/" + str(score.user.id),