[Scummvm-git-logs] scummvm-sites add-ongoing-results-to-getusers -> 5b5d08680547640ce96da0ead4067e769e606a58

shkupfer noreply at scummvm.org
Mon Sep 9 23:39:18 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:
5b5d086805 Add number-ified ongoingresults to getUsers response


Commit: 5b5d08680547640ce96da0ead4067e769e606a58
    https://github.com/scummvm/scummvm-sites/commit/5b5d08680547640ce96da0ead4067e769e606a58
Author: Sam Kupfer (shkupf at gmail.com)
Date: 2024-09-09T19:39:03-04:00

Commit Message:
Add number-ified ongoingresults to getUsers response

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