From fa0e9930d640c648ce9925626e3daaed757b6ad3 Mon Sep 17 00:00:00 2001 From: Cerus Date: Sun, 12 Jun 2022 23:40:29 +0200 Subject: [PATCH] Patch: Add filter list to /v1/info, fix grammar in /v1/info --- pom.xml | 2 +- .../dev/cerus/mcheadrender/web/route/v1/InfoRouteV1.java | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 9775369..f9f80c7 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ dev.cerus mc-head-render - 1.0.2 + 1.0.3 17 diff --git a/src/main/java/dev/cerus/mcheadrender/web/route/v1/InfoRouteV1.java b/src/main/java/dev/cerus/mcheadrender/web/route/v1/InfoRouteV1.java index d18d302..b6c507e 100644 --- a/src/main/java/dev/cerus/mcheadrender/web/route/v1/InfoRouteV1.java +++ b/src/main/java/dev/cerus/mcheadrender/web/route/v1/InfoRouteV1.java @@ -41,8 +41,9 @@ public void handle(@NotNull final Context ctx) throws Exception { "cached": %d, "expiration_in_seconds": %d }, - "skin_provider": %s, - "renderer": %s, + "skin_providers": %s, + "renderers": %s, + "filters": %s, "ratelimit": { "max_requests": %d, "period_in_seconds": %d, @@ -59,6 +60,9 @@ public void handle(@NotNull final Context ctx) throws Exception { "[" + this.webServer.getRendererRegistry().ids().stream() .map(s -> "\"" + s + "\"") .collect(Collectors.joining(", ")) + "]", + "[" + this.webServer.getFilterRegistry().ids().stream() + .map(s -> "\"" + s + "\"") + .collect(Collectors.joining(", ")) + "]", Globals.MAX_REQUESTS, Globals.RATE_LIMITER_EXPIRATION, this.webServer.getRateLimiter().getRequests(ctx)