mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 22:27:55 +01:00
- Fix crlt for edition.
- Support minor changes
This commit is contained in:
parent
a4e097ad15
commit
0bd71c12f9
@ -9,7 +9,6 @@ import com.wisemapping.rest.model.RestMindmap;
|
|||||||
import com.wisemapping.rest.model.RestMindmapList;
|
import com.wisemapping.rest.model.RestMindmapList;
|
||||||
import com.wisemapping.security.Utils;
|
import com.wisemapping.security.Utils;
|
||||||
import com.wisemapping.service.MindmapService;
|
import com.wisemapping.service.MindmapService;
|
||||||
import org.codehaus.jackson.map.ObjectMapper;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -49,7 +48,7 @@ public class MindmapController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"})
|
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"})
|
||||||
public ModelAndView updateMap(@RequestBody RestMindmap restMindmap, @PathVariable int id) throws IOException, WiseMappingException {
|
public ModelAndView updateMap(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor) throws IOException, WiseMappingException {
|
||||||
|
|
||||||
final MindMap mindMap = mindmapService.getMindmapById(id);
|
final MindMap mindMap = mindmapService.getMindmapById(id);
|
||||||
final User user = Utils.getUser();
|
final User user = Utils.getUser();
|
||||||
@ -67,7 +66,7 @@ public class MindmapController {
|
|||||||
|
|
||||||
final String xml = restMindmap.getXml();
|
final String xml = restMindmap.getXml();
|
||||||
mindMap.setXmlStr(xml);
|
mindMap.setXmlStr(xml);
|
||||||
mindmapService.updateMindmap(mindMap, true);
|
mindmapService.updateMindmap(mindMap, minor);
|
||||||
|
|
||||||
return new ModelAndView("responseView", "message", "Map has been updated successfully");
|
return new ModelAndView("responseView", "message", "Map has been updated successfully");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user