mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-07 22:38:02 +03:00
fix typos
This commit is contained in:
@@ -40,7 +40,7 @@ t.test("GET /api/v1/games/:game/:playtype/tables/:tableID", (t) => {
|
||||
});
|
||||
|
||||
t.test("Should return 404 if the table does not exist.", async (t) => {
|
||||
const res = await mockApi.get("/api/v1/games/iidx/SP/tables/non_existant_table");
|
||||
const res = await mockApi.get("/api/v1/games/iidx/SP/tables/non_existent_table");
|
||||
|
||||
t.equal(res.statusCode, 404);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ router.get("/", async (req, res) => {
|
||||
logger.error(
|
||||
`Score ${
|
||||
score.scoreID
|
||||
} refers to non-existant data: [user,chart,song] [${!!user} ${!!chart} ${!!song}]`
|
||||
} refers to non-existent data: [user,chart,song] [${!!user} ${!!chart} ${!!song}]`
|
||||
);
|
||||
|
||||
return res.status(500).json({
|
||||
@@ -110,6 +110,20 @@ router.patch(
|
||||
{ $set: modifyOption }
|
||||
);
|
||||
|
||||
if (modifyOption.highlight === true || modifyOption.highlight === false) {
|
||||
await db["personal-bests"].findOneAndUpdate(
|
||||
{
|
||||
chartID: score.chartID,
|
||||
userID: score.userID,
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
highlight: modifyOption.highlight,
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return res.status(200).json({
|
||||
success: true,
|
||||
description: `Updated score.`,
|
||||
|
||||
Reference in New Issue
Block a user