Skip to content

Commit

Permalink
ALS-4978: Add missing request body annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Nov 21, 2023
1 parent c6d58cf commit 5e5ca70
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public PicSureService(QueryService queryService, TimelineProcessor timelineProce
private static final int RESPONSE_CACHE_SIZE = 50;

@PostMapping("/info")
public ResourceInfo info(QueryRequest request) {
public ResourceInfo info(@RequestBody QueryRequest request) {
ResourceInfo info = new ResourceInfo();
info.setName("PhenoCube v1.0-SNAPSHOT");
info.setId(UUID.randomUUID());
Expand Down Expand Up @@ -131,7 +131,7 @@ public ResourceInfo info(QueryRequest request) {
}

@PostMapping("/search")
public SearchResults search(QueryRequest searchJson) {
public SearchResults search(@RequestBody QueryRequest searchJson) {
Set<Entry<String, ColumnMeta>> allColumns = abstractProcessor.getDictionary().entrySet();

// Phenotype Values
Expand Down Expand Up @@ -173,7 +173,7 @@ public SearchResults search(QueryRequest searchJson) {
}

@PostMapping("/query")
public ResponseEntity<QueryStatus> query(QueryRequest queryJson) {
public ResponseEntity<QueryStatus> query(@RequestBody QueryRequest queryJson) {
if (Crypto.hasKey(Crypto.DEFAULT_KEY_NAME)) {
try {
Query query = convertIncomingQuery(queryJson);
Expand Down Expand Up @@ -214,7 +214,7 @@ private QueryStatus convertToQueryStatus(AsyncResult entity) {
}

@PostMapping(value = "/query/{resourceQueryId}/result", produces = MediaType.TEXT_PLAIN_VALUE)
public ResponseEntity queryResult(@PathVariable("resourceQueryId") UUID queryId, QueryRequest resultRequest) {
public ResponseEntity queryResult(@PathVariable("resourceQueryId") UUID queryId, @RequestBody QueryRequest resultRequest) {
AsyncResult result = queryService.getResultFor(queryId.toString());
if (result == null) {
// This happens sometimes when users immediately request the status for a query
Expand All @@ -240,7 +240,7 @@ public ResponseEntity queryResult(@PathVariable("resourceQueryId") UUID queryId,
}

@PostMapping("/query/{resourceQueryId}/status")
public QueryStatus queryStatus(@PathVariable("resourceQueryId") UUID queryId, QueryRequest request) {
public QueryStatus queryStatus(@PathVariable("resourceQueryId") UUID queryId, @RequestBody QueryRequest request) {
return convertToQueryStatus(queryService.getStatusFor(queryId.toString()));
}

Expand All @@ -256,7 +256,7 @@ public ResponseEntity queryFormat(QueryRequest resultRequest) {
}

@PostMapping(value = "/query/sync", produces = MediaType.TEXT_PLAIN_VALUE)
public ResponseEntity querySync(QueryRequest resultRequest) {
public ResponseEntity querySync(@RequestBody QueryRequest resultRequest) {
if (Crypto.hasKey(Crypto.DEFAULT_KEY_NAME)) {
try {
return _querySync(resultRequest);
Expand Down

0 comments on commit 5e5ca70

Please sign in to comment.