mirror of
https://github.com/Qortal/qortal.git
synced 2025-03-13 11:12:31 +00:00
Improved GET /admin/settings/{setting}
further, in order to support all settings (fixes ones such as bitcoinNet).
This commit is contained in:
parent
2370a67b8a
commit
9cd6372161
@ -184,7 +184,7 @@ public class AdminResource {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
public Object setting(@PathParam("setting") String setting) {
|
public String setting(@PathParam("setting") String setting) {
|
||||||
try {
|
try {
|
||||||
Object settingValue = FieldUtils.readField(Settings.getInstance(), setting, true);
|
Object settingValue = FieldUtils.readField(Settings.getInstance(), setting, true);
|
||||||
if (settingValue == null) {
|
if (settingValue == null) {
|
||||||
@ -198,8 +198,8 @@ public class AdminResource {
|
|||||||
JSONArray array = new JSONArray((List<Object>) settingValue);
|
JSONArray array = new JSONArray((List<Object>) settingValue);
|
||||||
return array.toString(4);
|
return array.toString(4);
|
||||||
}
|
}
|
||||||
return settingValue;
|
|
||||||
|
|
||||||
|
return settingValue.toString();
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_CRITERIA, e);
|
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_CRITERIA, e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user