Revert "Bug WISE-16 fixed. Backed completed."

This reverts commit 9a77ff3bb8.
This commit is contained in:
Paulo Gustavo Veiga
2014-01-10 00:21:21 -03:00
parent 9a77ff3bb8
commit a2db34ae61
4 changed files with 5 additions and 63 deletions

View File

@@ -117,18 +117,11 @@ public class AdminController extends BaseController {
@RequestMapping(method = RequestMethod.DELETE, value = "admin/users/{id}", consumes = {"text/plain"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void deleteUserByEmail(@PathVariable long id) throws WiseMappingException {
public void getUserByEmail(@PathVariable long id) throws WiseMappingException {
final User user = userService.getUserBy(id);
if (user == null) {
throw new IllegalArgumentException("User '" + id + "' could not be found");
}
final List<Collaboration> collaborations = mindmapService.findCollaborations(user);
for (Collaboration collaboration : collaborations) {
final Mindmap mindmap = collaboration.getMindMap();
mindmapService.removeMindmap(mindmap,user);
}
userService.deleteUser(user);
}