CHUNITHM & O.N.G.E.K.I.: Handle userRatingBase*List (#113)

These tables are not used by the game, but are useful for anyone wanting to develop a web UI showing what the player's rating consists of. As such, instead of storing them in JSON columns, I've split them out, one row per each entry.

Reviewed-on: Hay1tsme/artemis#113
Co-authored-by: beerpsi <beerpsi@duck.com>
Co-committed-by: beerpsi <beerpsi@duck.com>
This commit is contained in:
2024-03-14 14:44:32 +00:00
committed by Hay1tsme
parent 346f82a32a
commit 40a0817009
5 changed files with 178 additions and 5 deletions

View File

@ -1067,6 +1067,24 @@ class OngekiBase:
if "userKopList" in upsert:
for x in upsert["userKopList"]:
await self.data.profile.put_kop(user_id, x)
for rating_type in {
"userRatingBaseBestList",
"userRatingBaseBestNewList",
"userRatingBaseHotList",
"userRatingBaseNextList",
"userRatingBaseNextNewList",
"userRatingBaseHotNextList",
}:
if rating_type not in upsert:
continue
await self.data.profile.put_profile_rating(
user_id,
self.version,
rating_type,
upsert[rating_type],
)
return {"returnCode": 1, "apiName": "upsertUserAll"}