Fix: Support both numeric and hash song IDs for leaderboard

This commit is contained in:
2026-01-17 19:56:41 +08:00
parent 3f7ff13ef7
commit 9935d70e31
5 changed files with 20 additions and 15 deletions

View File

@@ -85,9 +85,10 @@ leaderboard_submit = {
'$schema': 'http://json-schema.org/schema#',
'type': 'object',
'properties': {
'song_id': {'type': 'number'},
'song_id': {'type': ['number', 'string']},
'difficulty': {'type': 'string'},
'score': {'type': 'object'}
},
'required': ['song_id', 'difficulty', 'score']
}