chuni: Correctly implement recent rating requests

This commit is contained in:
e76cd2ec3a63f11710dc9fa0bc5b66176521af0a
2020-08-02 12:22:01 -04:00
committed by Tau
parent 6c22c4287e
commit 71a7cd7eed
9 changed files with 133 additions and 16 deletions
+8
View File
@@ -14,6 +14,7 @@ import { readUserDataEx } from "../proto/userDataEx";
import { readUserDuelList } from "../proto/userDuelList";
import { readUserPlaylog } from "../proto/userPlaylog";
import { readUserCharge } from "../proto/userCharge";
import { readUserRecentRating } from "../proto/userRecentRating";
import { readUserCourse } from "../proto/userCourse";
// It shouldn't need to be said really, but seeing as this message (A) requires
@@ -84,5 +85,12 @@ export default async function upsertUserAll(
await rep.userDuelList().save(profileId, readUserDuelList(item));
}
await rep
.userRecentRating()
.save(
profileId,
(payload.userRecentRatingList || []).map(readUserRecentRating)
);
return { returnCode: "1" };
}