From b4837cc87af05094cae33b60fced0adf1ad13bf2 Mon Sep 17 00:00:00 2001 From: Florian Necas Date: Tue, 3 Dec 2024 16:09:20 +0100 Subject: [PATCH] feat: add a style-config entrypoint to expose datadir/georchestra style (logo and stylesheet) --- .../gateway/app/GeorchestraGatewayApplication.java | 4 ++-- gateway/src/main/resources/static/login/getConfig.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gateway/src/main/java/org/georchestra/gateway/app/GeorchestraGatewayApplication.java b/gateway/src/main/java/org/georchestra/gateway/app/GeorchestraGatewayApplication.java index c0d7b828..d49ff0dd 100644 --- a/gateway/src/main/java/org/georchestra/gateway/app/GeorchestraGatewayApplication.java +++ b/gateway/src/main/java/org/georchestra/gateway/app/GeorchestraGatewayApplication.java @@ -151,9 +151,9 @@ public String loginPage(@RequestParam Map allRequestParams, Mode return "login"; } - @GetMapping(path = "/config", produces = "application/json") + @GetMapping(path = "/style-config", produces = "application/json") @ResponseBody - public Mono> config(ServerWebExchange exchange) { + public Mono> styleConfig() { Map ret = new LinkedHashMap<>(); ret.put("stylesheet", georchestraStylesheet); ret.put("logo", logoUrl); diff --git a/gateway/src/main/resources/static/login/getConfig.js b/gateway/src/main/resources/static/login/getConfig.js index 7d569885..da82af3d 100644 --- a/gateway/src/main/resources/static/login/getConfig.js +++ b/gateway/src/main/resources/static/login/getConfig.js @@ -1,4 +1,4 @@ -fetch("/config").then(res => { +fetch("/style-config").then(res => { if (res.ok) { return res.json(); }