X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FLikeAjaxPage.java;h=e7574a5436e818774cc64bc526eadea4fae3cef7;hb=53a71d1d6b91e4d56af49a06f2e06bc4d11bf3eb;hp=3f6f8db56ff173496538f6a3b2c5b1350def9f2c;hpb=50ce65f69e49ed10abeedaeb6615ffb37a0c0772;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/LikeAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/LikeAjaxPage.java index 3f6f8db..e7574a5 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/LikeAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/LikeAjaxPage.java @@ -1,5 +1,5 @@ /* - * Sone - LikeAjaxPage.java - Copyright © 2010–2012 David Roden + * Sone - LikeAjaxPage.java - Copyright © 2010–2013 David Roden * * 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 @@ -21,7 +21,6 @@ import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.web.WebInterface; import net.pterodactylus.sone.web.page.FreenetRequest; -import net.pterodactylus.util.json.JsonObject; /** * AJAX page that lets the user like a {@link Post}. @@ -44,13 +43,13 @@ public class LikeAjaxPage extends JsonPage { * {@inheritDoc} */ @Override - protected JsonObject createJsonObject(FreenetRequest request) { + protected JsonReturnObject createJsonObject(FreenetRequest request) { String type = request.getHttpRequest().getParam("type", null); String id = request.getHttpRequest().getParam(type, null); if ((id == null) || (id.length() == 0)) { return createErrorJsonObject("invalid-" + type + "-id"); } - Sone currentSone = getCurrentSone(request.getToadletContext()); + Sone currentSone = getCurrentSone(request.getToadletContext()).get(); if (currentSone == null) { return createErrorJsonObject("auth-required"); }