*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Sone currentSone = getCurrentSone(request.getToadletContext(), false);
if (currentSone == null) {
return createErrorJsonObject("auth-required");
}
String soneId = request.getHttpRequest().getParam("sone");
Sone currentSone = getCurrentSone(request.getToadletContext(), false);
if (currentSone == null) {
return createErrorJsonObject("auth-required");
}
String soneId = request.getHttpRequest().getParam("sone");
if (sone == null) {
return createErrorJsonObject("invalid-sone-id");
}
webInterface.getCore().distrustSone(currentSone, sone);
if (sone == null) {
return createErrorJsonObject("invalid-sone-id");
}
webInterface.getCore().distrustSone(currentSone, sone);
- Trust trust = webInterface.getCore().getTrust(currentSone, sone);
- if (trust == null) {
- return createErrorJsonObject("wot-plugin");
- }
- return createSuccessJsonObject().put("trustValue", trust.getExplicit());
+ return createSuccessJsonObject().put("trustValue", webInterface.getCore().getPreferences().getNegativeTrust());