diff --git a/src/main/java/io/autoinvestor/ui/GetAlertsController.java b/src/main/java/io/autoinvestor/ui/GetAlertsController.java index 10410ad..5559a65 100644 --- a/src/main/java/io/autoinvestor/ui/GetAlertsController.java +++ b/src/main/java/io/autoinvestor/ui/GetAlertsController.java @@ -4,10 +4,7 @@ import io.autoinvestor.application.GetAlertsQueryHandler; import io.autoinvestor.application.GetAlertsQueryResponse; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -22,8 +19,7 @@ public GetAlertsController(GetAlertsQueryHandler handler) { } @GetMapping - public ResponseEntity> getAlerts( - @RequestParam String userId) { + public ResponseEntity> getAlerts(@RequestHeader(value = "X-User-Id") String userId) { List queryResponse = this.handler.handle( new GetDecisionsQuery(userId)