Skip to content

Commit

Permalink
chnaged the metadata endpoint from an independent endpoint that uses …
Browse files Browse the repository at this point in the history
…path variable, into a request param within the getSeqcolByDigest endpoint
  • Loading branch information
waterflow80 committed May 17, 2024
1 parent fc9b52a commit ea6e9e6
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@ public ResponseEntity<?> getSeqColByDigestAndLevel(
required = true) @PathVariable String digest,
@Parameter(name = "level",
description = "The desired output's level (1 or 2)",
example = "1") @RequestParam(required = false) String level) {
example = "1") @RequestParam(required = false) String level,
@Parameter(name = "metadata",
description = "A boolean value that indicates if we need the metadata of the given seqcol digest",
example = "true, 1, yes")
@RequestParam(required = false, defaultValue = "false") boolean metadata) {
if (metadata) {
return new ResponseEntity<>(
seqColService.getSeqColMetadataBySeqColDigest(digest), HttpStatus.OK
);
}
if (level == null) level = "none";
try {
switch (level) {
Expand Down Expand Up @@ -83,13 +92,6 @@ public ResponseEntity<?> getSeqColByDigestAndLevel(
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}

@GetMapping(value = "/collection/{digest}/metadata")
public ResponseEntity<?> getSeqColMetadataByDigest(@PathVariable String digest) {
return new ResponseEntity<>(
seqColService.getSeqColMetadataBySeqColDigest(digest), HttpStatus.OK
);
}

@GetMapping("/service-info")
public ResponseEntity<?> getServiceInfo() {
try {
Expand Down

0 comments on commit ea6e9e6

Please sign in to comment.