@RequestMapping(value = "/listLinks", method = RequestMethod.POST)
 public ResponseEntity<List<ShortURL>> listLinks(
     @RequestParam(value = "username") String username, HttpServletRequest request) {
   logger.info("Requested list of links from user with username " + username);
   List<ShortURL> list = null;
   if (username != null && !username.equals("")) {
     list = shortURLRepositoryExtended.findByUsername(username);
   }
   if (list != null) {
     return new ResponseEntity<>(list, HttpStatus.ACCEPTED);
   } else {
     return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
   }
 }