From 9cd6372161ee55627fd80b38a08d57a3e29b1146 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Fri, 21 Apr 2023 12:06:16 +0100 Subject: [PATCH] Improved `GET /admin/settings/{setting}` further, in order to support all settings (fixes ones such as bitcoinNet). --- .../org/qortal/api/restricted/resource/AdminResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/qortal/api/restricted/resource/AdminResource.java b/src/main/java/org/qortal/api/restricted/resource/AdminResource.java index 20caf3d4..ecb8c6c9 100644 --- a/src/main/java/org/qortal/api/restricted/resource/AdminResource.java +++ b/src/main/java/org/qortal/api/restricted/resource/AdminResource.java @@ -184,7 +184,7 @@ public class AdminResource { ) } ) - public Object setting(@PathParam("setting") String setting) { + public String setting(@PathParam("setting") String setting) { try { Object settingValue = FieldUtils.readField(Settings.getInstance(), setting, true); if (settingValue == null) { @@ -198,8 +198,8 @@ public class AdminResource { JSONArray array = new JSONArray((List) settingValue); return array.toString(4); } - return settingValue; + return settingValue.toString(); } catch (IllegalAccessException e) { throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_CRITERIA, e); }