if ((id == null) || (id.length() == 0)) {
return createErrorJsonObject("invalid-" + type + "-id");
}
- Sone currentSone = getCurrentSone(request.getToadletContext());
- if (currentSone == null) {
- return createErrorJsonObject("auth-required");
- }
+ Sone currentSone = getCurrentSone(request.getToadletContext()).get();
if ("post".equals(type)) {
currentSone.removeLikedPostId(id);
webInterface.getCore().touchConfiguration();