feat(score): Added a scoring system to log 10 last victories

This commit is contained in:
gauvainboiche
2026-04-02 23:11:41 +02:00
parent bfdc836275
commit b11446cf56
7 changed files with 190 additions and 4 deletions
+12
View File
@@ -32,6 +32,7 @@ import {
checkTeamVisibility,
insertTeamVisibility,
getTeamVisibleCells,
getRoundHistory,
} from "../db/gameDb.js";
import {
nextResetUtc,
@@ -553,4 +554,15 @@ router.get("/cell/attacks", async (req, res) => {
}
});
// GET /api/round-history
router.get("/round-history", async (_req, res) => {
try {
const history = await getRoundHistory(10);
res.json(history);
} catch (e) {
console.error(e);
res.status(500).json({ error: "database_error" });
}
});
export default router;