forked from Qortal/qortal
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 {
|
||||
Object settingValue = FieldUtils.readField(Settings.getInstance(), setting, true);
|
||||
if (settingValue == null) {
|
||||
@ -198,8 +198,8 @@ public class AdminResource {
|
||||
JSONArray array = new JSONArray((List<Object>) settingValue);
|
||||
return array.toString(4);
|
||||
}
|
||||
return settingValue;
|
||||
|
||||
return settingValue.toString();
|
||||
} catch (IllegalAccessException e) {
|
||||
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_CRITERIA, e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user