Skip to content

Commit

Permalink
make API key optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbranham committed Aug 20, 2024
1 parent aef72e0 commit 48c1cf6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ public ResponseEntity createFile(@RequestParam("file") MultipartFile file, @Path
}

@GetMapping("/files/{fileId}")
public ResponseEntity downloadFile(@PathVariable String fileId, @RequestParam("key") String apiKey) {
public ResponseEntity downloadFile(@PathVariable String fileId,
@RequestParam(name = "key", required = false) String apiKey) {
log.info("Requested to get file: {}", fileId);
var entity = files.findById(fileId);
if (entity.isEmpty()) {
Expand Down

0 comments on commit 48c1cf6

Please sign in to comment.