Commit 969bcf97 authored by Ben Anderson's avatar Ben Anderson

Changed return type of getPromotionById

parent 69a4a442
...@@ -29,10 +29,11 @@ public class PromotionsController { ...@@ -29,10 +29,11 @@ public class PromotionsController {
} }
@GetMapping("/{id}") @GetMapping("/{id}")
public Mono<PromotionDto> getPromotionById(@PathVariable String id){ public ResponseEntity<Mono<PromotionDto>> getPromotionById(@PathVariable String id){
return promotionService Mono<PromotionDto> responseData = promotionService
.findPromoById(id) .findPromoById(id)
.switchIfEmpty(Mono.error(new PromotionNotFoundException(id))); .switchIfEmpty(Mono.error(new PromotionNotFoundException(id)));
return ResponseEntity.ok().body(responseData);
} }
@PostMapping() @PostMapping()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment