projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Distinguish between local and “normal” Sones in FCP handler.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
ajax
/
UnlikeAjaxPage.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/ajax/UnlikeAjaxPage.java
b/src/main/java/net/pterodactylus/sone/web/ajax/UnlikeAjaxPage.java
index
17be966
..
b1ab9e0
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/ajax/UnlikeAjaxPage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/ajax/UnlikeAjaxPage.java
@@
-49,10
+49,7
@@
public class UnlikeAjaxPage extends JsonPage {
if ((id == null) || (id.length() == 0)) {
return createErrorJsonObject("invalid-" + type + "-id");
}
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();
if ("post".equals(type)) {
currentSone.removeLikedPostId(id);
webInterface.getCore().touchConfiguration();