fix: stamp lastSavedAt into game state blob on save

This commit is contained in:
2026-03-06 19:10:12 -08:00
committed by Naomi Carrigan
parent 3e20613851
commit 50fe905610
+7
View File
@@ -367,6 +367,13 @@ gameRouter.post("/save", async (context) => {
const now = Date.now();
// Stamp the authoritative save timestamp into the state blob so that on the
// next load the client reads the correct value from state.player.lastSavedAt.
stateToSave = {
...stateToSave,
player: { ...stateToSave.player, lastSavedAt: now },
};
await prisma.player.update({
where: { discordId },
data: {