fix: set playcount=1 for beatoraja score data, instead of 0 (#1620)

* fix: set playcount=1 for beatoraja score data, instead of 0

* fix: tests
This commit is contained in:
zk
2026-06-02 17:42:03 +01:00
committed by GitHub
parent 20caa1af41
commit 0a74b4277a
4 changed files with 5 additions and 5 deletions
@@ -111,7 +111,7 @@ describe("GET /ir/beatoraja/charts/:chartSHA256/scores (Postgres)", () => {
epg: 617,
lpg: 0,
player: "",
playcount: 0,
playcount: 1,
});
});
@@ -73,7 +73,7 @@ router.get("/scores", async (req, res) => {
chart.data.hashSHA256,
score.userID === requestingUserID ? "" : username,
chart.data.notecount,
0,
1,
),
);
}
@@ -310,7 +310,7 @@ describe("GET /ir/beatoraja/rivals and /players/:userID/scores (Postgres)", () =
expect(res.body.body[0]).toMatchObject({
sha256: BMSGazerChart.data.hashSHA256,
player: "",
playcount: 0,
playcount: 1,
minbp: 12,
gauge: 80,
maxcombo: 321,
@@ -340,7 +340,7 @@ describe("GET /ir/beatoraja/rivals and /players/:userID/scores (Postgres)", () =
expect(res.status).toBe(200);
expect(res.body.body[0]).toMatchObject({
player: "beatoraja_rival_scores_rival",
playcount: 0,
playcount: 1,
});
});
@@ -112,7 +112,7 @@ async function FormatBeatorajaPbsForUser(user: UserDocument, requestedBy: intege
chartData.sha256,
user.id === requestedBy ? "" : user.username,
chartData.notecount,
0,
1,
);
}),
);