Skip to content

feat(stats): expose the achievement code on profile and leaderboard rows - #107

Merged
diangogav merged 2 commits into
mainfrom
feat/achievement-code
Oct 11, 2026
Merged

diangogav merged 2 commits into
mainfrom
feat/achievement-code

Conversation

@diangogav

Copy link
Copy Markdown
Owner

Depends on diangogav/evolution-types#16 (the src/evolution-types pointer moves to its head commit, which adds achievements.code).

Summary

  • achievements[] items on GET /users/:userId/stats and GET /stats carry code: the stable key of a gameplay achievement awarded by the game server (first_win, wins_10, format_first_win:Edison, ...), null for admin tournament trophies.
  • UserAchievementSchema, the UserAchievement domain object and the domain doc gain the field; both jsonb_build_object builders select a.code.

Read side of the automatic achievements feature (game server: diangogav/EDOpro-server-ts#405; client follow-up hides "0 pts" for gameplay rows).

Test plan

  • bun run lint
  • bun test (521 passed)
  • bun run build
  • After the migration on dev: GET /api/v1/users/<id>/stats shows code on each achievement

@diangogav diangogav self-assigned this Oct 11, 2026
@diangogav
diangogav merged commit a92de0d into main Oct 11, 2026
1 check passed
@diangogav
diangogav deleted the feat/achievement-code branch October 11, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant