X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FDistrustAjaxPage.java;h=8dfe085e31895fc5b27a79ccb14b5bfa6270e995;hp=4206e8f4965d55c8bac094bedc572acfde7cde50;hb=53a71d1d6b91e4d56af49a06f2e06bc4d11bf3eb;hpb=1a2c9eb50e89d9ba5f9ea9b72721ebfeb68650cd diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.java index 4206e8f..8dfe085 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.java @@ -47,10 +47,7 @@ public class DistrustAjaxPage extends JsonPage { */ @Override protected JsonReturnObject createJsonObject(FreenetRequest request) { - Sone currentSone = getCurrentSone(request.getToadletContext(), false); - if (currentSone == null) { - return createErrorJsonObject("auth-required"); - } + Sone currentSone = getCurrentSone(request.getToadletContext(), false).get(); String soneId = request.getHttpRequest().getParam("sone"); Optional sone = webInterface.getCore().getSone(soneId); if (!sone.isPresent()) {