Ejemplo n.º 1
0
  @RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
  Resources<CoinOrderResource> readOrders(@PathVariable String userId) {
    this.validateUser(userId);

    List<CoinOrderResource> bookmarkResourceList =
        coinOrderRepository
            .findByAccountUsername(userId)
            .stream()
            .map(CoinOrderResource::new)
            .collect(Collectors.toList());

    return new Resources<>(bookmarkResourceList);
  }