From 2e9bd5c77ecba8abec4285f9ff7d332b90f2d218 Mon Sep 17 00:00:00 2001 From: Elijah R Date: Wed, 3 Apr 2024 15:53:15 -0400 Subject: [PATCH] add random arg to chatlog api endpoint --- EmperorPalpatine/HTTPServer.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EmperorPalpatine/HTTPServer.cs b/EmperorPalpatine/HTTPServer.cs index ca65ce7..f914699 100644 --- a/EmperorPalpatine/HTTPServer.cs +++ b/EmperorPalpatine/HTTPServer.cs @@ -111,6 +111,8 @@ public class HTTPServer } if (context.Request.Query.ContainsKey("regex")) q.Regex = context.Request.Query["regex"]; + if (context.Request.Query.ContainsKey("random") && context.Request.Query["random"] == "1") + q.Random = true; if (q.Username == null && q.FromTimestamp == null && q.ToTimestamp == null && q.Count == null && q.Regex == null) q.Count = 10;