SHARE
TWEET

Untitled

a guest Jul 18th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Override
  2. public Mono<Order> create(CreateOrderRequest specs) {
  3.  
  4.     //itemRepository.findAll(specs.getItemCodes()) //returns Flux<Item>
  5.  
  6.  
  7.     final Order newOrder = new Order(items);
  8.     return orderRepository.insert(newOrder)
  9.             .switchIfEmpty(Mono.error(new ResponseStatusException(HttpStatus.BAD_REQUEST, "Failed to create order")));
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top