This commit is contained in:
Ezequiel Bergamaschi
2014-01-29 02:56:09 -03:00
committed by Ezequiel Bergamaschi
parent 9edea47dbd
commit b4c69133f5
3 changed files with 14 additions and 3 deletions

View File

@@ -76,9 +76,10 @@ public class LabelController extends BaseController {
return new RestLabelList(all);
}
@RequestMapping(method = RequestMethod.PUT, value = "/labels/{id}/maps", consumes = {"text/plain"})
@RequestMapping(method = RequestMethod.PUT, value = "/labels/maps", consumes = {"application/json"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void linkToMindMaps(@PathVariable int id, @RequestBody String ids) throws WiseMappingException {
public void linkToMindMaps(@RequestBody RestLabel restLabel, @RequestParam(required = true) String ids) throws WiseMappingException {
int id = restLabel.getId();
final Label label = labelService.getLabelById(id);
if (label == null) {
throw new LabelCouldNotFoundException("Label could not be found. Id: " + id);