[Scummvm-git-logs] scummvm-sites multiplayer -> 1def1bf0081e717d57adb64b3d2a6f6e0b1d3a79

shkupfer noreply at scummvm.org
Mon Sep 9 23:42:52 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-sites' repo located at https://github.com/scummvm/scummvm-sites .

Summary:
1def1bf008 Add number-ified ongoingresults to getUsers response (#25)


Commit: 1def1bf0081e717d57adb64b3d2a6f6e0b1d3a79
    https://github.com/scummvm/scummvm-sites/commit/1def1bf0081e717d57adb64b3d2a6f6e0b1d3a79
Author: shkupfer (shkupf at gmail.com)
Date: 2024-09-09T19:42:50-04:00

Commit Message:
Add number-ified ongoingresults to getUsers response (#25)

Changed paths:
    lobby/webhook/InternalWebhook.js


diff --git a/lobby/webhook/InternalWebhook.js b/lobby/webhook/InternalWebhook.js
index b157977..262a186 100644
--- a/lobby/webhook/InternalWebhook.js
+++ b/lobby/webhook/InternalWebhook.js
@@ -63,6 +63,11 @@ class InternalWebhook {
                   // Not logged in.
                   continue;
                 users[userId] = user;
+                const ongoingResultsStrings = await redis.getOngoingResults(userId, user.game);
+                const ongoingResults = Object.fromEntries(
+                    Object.entries(ongoingResultsStrings).map(([k, stat]) => [k, Number(stat)])
+                );
+                users[userId]["ongoingResults"] = ongoingResults;
             }
             res.status(200).json({users: users})
         });




More information about the Scummvm-git-logs mailing list