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

Changed return type of getPromotionById

parent 69a4a442
......@@ -29,10 +29,11 @@ public class PromotionsController {
}
@GetMapping("/{id}")
public Mono<PromotionDto> getPromotionById(@PathVariable String id){
return promotionService
public ResponseEntity<Mono<PromotionDto>> getPromotionById(@PathVariable String id){
Mono<PromotionDto> responseData = promotionService
.findPromoById(id)
.switchIfEmpty(Mono.error(new PromotionNotFoundException(id)));
return ResponseEntity.ok().body(responseData);
}
@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