Commit 3617d372 authored by Liang Ding's avatar Liang Ding

🎨 Cleanup code

parent 045587eb
...@@ -33,8 +33,6 @@ import org.b3log.solo.service.CommentQueryService; ...@@ -33,8 +33,6 @@ import org.b3log.solo.service.CommentQueryService;
import org.b3log.solo.util.Solos; import org.b3log.solo.util.Solos;
import org.json.JSONObject; import org.json.JSONObject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
/** /**
...@@ -92,8 +90,6 @@ public class CommentConsole { ...@@ -92,8 +90,6 @@ public class CommentConsole {
renderer.setJSONObject(ret); renderer.setJSONObject(ret);
try { try {
final HttpServletRequest request = context.getRequest();
final HttpServletResponse response = context.getResponse();
final String commentId = context.pathVar("id"); final String commentId = context.pathVar("id");
final JSONObject currentUser = Solos.getCurrentUser(context.getRequest(), context.getResponse()); final JSONObject currentUser = Solos.getCurrentUser(context.getRequest(), context.getResponse());
if (!commentQueryService.canAccessComment(commentId, currentUser)) { if (!commentQueryService.canAccessComment(commentId, currentUser)) {
...@@ -136,8 +132,6 @@ public class CommentConsole { ...@@ -136,8 +132,6 @@ public class CommentConsole {
renderer.setJSONObject(ret); renderer.setJSONObject(ret);
try { try {
final HttpServletRequest request = context.getRequest();
final HttpServletResponse response = context.getResponse();
final String commentId = context.pathVar("id"); final String commentId = context.pathVar("id");
final JSONObject currentUser = Solos.getCurrentUser(context.getRequest(), context.getResponse()); final JSONObject currentUser = Solos.getCurrentUser(context.getRequest(), context.getResponse());
if (!commentQueryService.canAccessComment(commentId, currentUser)) { if (!commentQueryService.canAccessComment(commentId, currentUser)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment