get label by id with user and validate label exists on link to mindmap

This commit is contained in:
Ezequiel Bergamaschi
2014-02-11 02:04:09 -03:00
parent c7674825a6
commit e9ca68732e
6 changed files with 29 additions and 14 deletions

View File

@@ -69,7 +69,7 @@ public class LabelController extends BaseController {
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void deleteLabelById(@PathVariable int id) throws WiseMappingException {
final User user = Utils.getUser();
final Label label = labelService.getLabelById(id);
final Label label = labelService.getLabelById(id, user);
if (label == null) {
throw new LabelCouldNotFoundException("Label could not be found. Id: " + id);
}