Skip to content
Snippets Groups Projects

Allow feedback to be flagged

Files

@@ -58,6 +58,7 @@ import nl.tudelft.queue.service.EditionService;
import nl.tudelft.queue.service.FeedbackService;
import nl.tudelft.queue.service.LabService;
import nl.tudelft.queue.service.PermissionService;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
public class HomeController {
@@ -290,6 +291,17 @@ public class HomeController {
return "home/feedback";
}
@GetMapping("/feedback/{id}/report")
@PreAuthorize("@permissionService.canViewFeedback(#id)")
public String reportFeedback(@RequestParam Long request, @RequestParam Long assistant,
@RequestParam String callback, @PathVariable String id) {
System.out.printf("Report for request %s for assistant %s", request,
assistant);
fs.reportFeedback(new Feedback.Id(request, assistant));
return "redirect:" + callback + "?success";
}
/**
* Fills in the model for a page where feedback is shown to the user.
*
Loading