From c769a5fbe7f1f5c1fc1c212604faa6a60c52214d Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 14 Mar 2022 15:08:31 -0300 Subject: [PATCH] Fix compilation --- .../com/wisemapping/rest/MindmapController.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java index 56857910..0ea8a1be 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -281,7 +281,7 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.POST, value = "/maps/{id}/collabs/", consumes = {"application/json", "application/xml"}, produces = {"application/json", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void updateCollabs(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException { + public void updateCollabs(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException, AccessDeniedSecurityException { final Mindmap mindMap = findMindmapById(id); // Only owner can change collaborators... @@ -328,7 +328,7 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/collabs/", consumes = {"application/json", "application/xml"}, produces = {"application/json", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void addCollab(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException { + public void addCollab(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException, AccessDeniedSecurityException { final Mindmap mindMap = findMindmapById(id); // Only owner can change collaborators... @@ -389,7 +389,7 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}/collabs", produces = {"application/json", "application/xml"}) - public RestCollaborationList retrieveList(@PathVariable int id) throws MapCouldNotFoundException { + public RestCollaborationList retrieveList(@PathVariable int id) throws MapCouldNotFoundException, AccessDeniedSecurityException { final Mindmap mindMap = findMindmapById(id); final Set collaborations = mindMap.getCollaborations(); @@ -407,14 +407,9 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/description", consumes = {"text/plain"}, produces = {"application/json", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void updateDescription(@RequestBody String description, @PathVariable int id) throws WiseMappingException { - - final Mindmap mindMap = findMindmapById(id); - final User user = Utils.getUser(); - - // Update map ... final Mindmap mindmap = findMindmapById(id); mindmap.setDescription(description); - mindmapService.updateMindmap(mindMap, false); + mindmapService.updateMindmap(mindmap, false); } @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/publish", consumes = {"text/plain"}, produces = {"application/json", "application/xml"})