]> git.deb.at Git - rhonda/impostor.git/commitdiff
Add stub for Find Lobby endpoint
authorminiduikboot <mini@duikbo.at>
Wed, 26 Mar 2025 20:18:50 +0000 (21:18 +0100)
committerminiduikboot <mini@duikbo.at>
Sun, 30 Mar 2025 18:35:19 +0000 (20:35 +0200)
Co-Authored-By: Niko233 <139348239+NikoCat233@users.noreply.github.com>
src/Impostor.Server/Http/GamesController.cs

index d7310e5ce687ddbe9c5b919e795de6f7cf3baaa1..e1aad79ccf9aea09c758dc335072663c325b7b2d 100644 (file)
@@ -113,6 +113,23 @@ public sealed class GamesController : ControllerBase
         return Ok(new FindGameByCodeResponse(GameListingV2.From(game)));
     }
 
+    [HttpGet("filtered")]
+    public IActionResult ShowFilteredLobbies()
+    {
+        // TODO: implement this stub
+        var response = new
+        {
+            games = Array.Empty<GameListingV2>(),
+            metadata = new
+            {
+                allGamesCount = _gameManager.Games.Count(),
+                matchingGamesCount = 0,
+            },
+        };
+
+        return Ok(response);
+    }
+
     private static uint ConvertAddressToNumber(IPAddress address)
     {
 #pragma warning disable CS0618 // Among Us only supports IPv4