Skip to content

refactor: migrate deprecated apis - #78

Merged
LingFeng-bbben merged 2 commits into
mainfrom
refactor/migrate-deprecated-apis
Nov 6, 2026
Merged

LingFeng-bbben merged 2 commits into
mainfrom
refactor/migrate-deprecated-apis

Conversation

@LeZi9916

@LeZi9916 LeZi9916 commented Nov 6, 2026

Copy link
Copy Markdown
Member

No description provided.

The backend deprecated several routes on 2026-10-21 and now returns
avatar IDs with the listings that show users.

- Call /api/maiscore/* instead of the deprecated routes:
  leaderboard/chart/by-id for GET maichart/{id}/score,
  leaderboard/period for POST playhistory/ranking, and
  sum/chart/by-uploader/{uploader} for GET stats/score-sums?uploader=.
- Drop the deprecated CommentPage.commentCount field from the types.
- Load every avatar through GET /api/avatar/{avatarId} with the new
  UserAvatar component and useAvatarUrl hook; remove the
  account/icon?username= endpoint from the frontend.
- Use the avatarId that score sums (player), the season leaderboard
  (player), comments (authorProfile) and the chart leaderboard
  (player.avatarId) now carry; only chart uploaders and rows without a
  profile still read the public profile, once per username.
- Add UserBrief and the new optional fields to the types.
- Update tests, the e2e API mocks and api-directory.md.
Every case failed before reaching the mascot: the image mock served
public/xxlb.jpg, which was removed with the unused assets, and the song
page went blank because the comments mock returned an array.

- Serve covers and avatars from an inline 1x1 PNG instead of a file in
  public/.
- Answer GET maichart/{id}/comments with an empty comment page.
- Answer interactsum in the current shape: one summary for the single
  GET and one per chart ID for the batch POST.
@LingFeng-bbben
LingFeng-bbben merged commit c988a35 into main Nov 6, 2026
2 checks passed
@LingFeng-bbben
LingFeng-bbben deleted the refactor/migrate-deprecated-apis branch November 6, 2026 16:24
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.

3 participants