aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-11-29 14:48:49 +0300
committerGravatar Vitaly Takmazov2018-11-29 14:48:49 +0300
commit3feb0307d778c6ceb6b3805587f539fe96a3eb34 (patch)
tree2307e27b195ffc395be2d8f84de19d7059ad72c4 /src/main/java/com/juick
parent33cc60ac5c5c4028c0f1fb64097523f606b6141e (diff)
fix likes deletion
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/service/MessagesServiceImpl.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java
index 7951eb42..f6723260 100644
--- a/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -279,10 +279,9 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
SqlParameterSource sqlParameterSource = new MapSqlParameterSource()
.addValue("uid", vuid)
.addValue("uri", userUri)
- .addValue("like_id", reaction)
.addValue("mid", mid);
boolean wasDeleted = getNamedParameterJdbcTemplate()
- .update("DELETE FROM favorites WHERE user_id=:uid AND message_id=:mid AND like_id=:like_id AND user_uri=:uri", sqlParameterSource) > 0;
+ .update("DELETE FROM favorites WHERE user_id=:uid AND message_id=:mid AND user_uri=:uri", sqlParameterSource) > 0;
if (wasDeleted) {
return RecommendStatus.Deleted;
} else {