add random arg to chatlog api endpoint

This commit is contained in:
Elijah R 2024-04-03 15:53:15 -04:00
parent 67903be1dd
commit 2e9bd5c77e

View file

@ -111,6 +111,8 @@ public class HTTPServer
} }
if (context.Request.Query.ContainsKey("regex")) if (context.Request.Query.ContainsKey("regex"))
q.Regex = context.Request.Query["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 && if (q.Username == null && q.FromTimestamp == null && q.ToTimestamp == null && q.Count == null &&
q.Regex == null) q.Regex == null)
q.Count = 10; q.Count = 10;