Repository navigation
feat: use chart ids and level hashes from the level-hash backend - #79
Merged
Merged
Conversation
Follows TeamMajdata/mmfcapi#44, where scores are stored per level hash and interactions, votes, comments and collections are keyed by chart id. - Score cards rank by GET api/maiscore/leaderboard/chart/by-level/{levelHash} and fall back to the chart leaderboard when a score has no level hash. - The chart leaderboard reads the { hash, levelHashes, scores } response. - The season leaderboard and its per-chart breakdown send songIds (chart ids) instead of songHashes. - Collections add and remove charts with chartIdsToAdd/chartIdsToRemove and save items as chart ids, so the collection page no longer fetches summaries for hashes. - Document the API changes in api-directory.md and add unit tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
配合 TeamMajdata/mmfcapi#44:后端成绩按 level hash 存储,互动、投票、评论和歌单按谱面 Id 存储。需要与后端 TeamMajdata/mmfcapi#47 一起上线:先迁移数据并部署后端,再部署前端。
改动
GET /api/maiscore/leaderboard/chart/by-level/{levelHash},成绩没有 level hash 时退回按谱面查询。{ hash, levelHashes, scores }。songIds(谱面 Id)代替songHashes。chartIdsToAdd/chartIdsToRemove,保存歌单时items为谱面 Id,歌单页不再为取 hash 请求 summary。api-directory.md记录接口变化,并新增单元测试。测试
npm test:32 个文件、230 个测试全部通过;tsc -b和 i18n 检查通过。