From 7a49aed6717784b135439366c7c1d8b02fa2058f Mon Sep 17 00:00:00 2001 From: Alex Bogdanovski Date: Thu, 14 Sep 2023 21:38:18 +0300 Subject: [PATCH] fixed bug preventing users from applying the favorite tags and 'near me' filters --- .../com/erudika/scoold/controllers/QuestionsController.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/erudika/scoold/controllers/QuestionsController.java b/src/main/java/com/erudika/scoold/controllers/QuestionsController.java index d465634b..b42a8934 100755 --- a/src/main/java/com/erudika/scoold/controllers/QuestionsController.java +++ b/src/main/java/com/erudika/scoold/controllers/QuestionsController.java @@ -158,12 +158,11 @@ public void getSimilarAjax(@PathVariable String like, HttpServletRequest req, Ht } @GetMapping({"/questions/favtags", "/questions/local"}) - public String getSorted(@PathVariable(required = false) String filter, - @RequestParam(required = false) String sortby, HttpServletRequest req, Model model) { + public String getSorted(@RequestParam(required = false) String sortby, HttpServletRequest req, Model model) { if (!utils.isDefaultSpacePublic() && !utils.isAuthenticated(req)) { return "redirect:" + SIGNINLINK + "?returnto=" + req.getRequestURI(); } - getQuestions(sortby, filter, req, model); + getQuestions(sortby, req.getServletPath().endsWith("/favtags") ? "favtags" : "local", req, model); model.addAttribute("path", "questions.vm"); model.addAttribute("title", utils.getLang(req).get("questions.title")); model.addAttribute("questionsSelected", "navbtn-hover");