Views fix

This commit is contained in:
2026-02-17 02:23:13 +01:00
parent bd54227a98
commit de07f634f9
+1
View File
@@ -46,6 +46,7 @@ export async function updateLiveRunViews(
): Promise<number | null> {
const run = await getLiveRun(id);
if (!run) return null;
if (run.views === 0 && increment < 0) return null;
run.views += increment;
await redis.set(`liveRun:${run.id}`, JSON.stringify(run));
return run.views;