Skip to content

Commit

Permalink
Remove Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
tcezard committed Jun 27, 2024
1 parent e98b5a6 commit beacaf7
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,8 @@ public ResponseEntity<?> markSubmissionStatus(@PathVariable("submissionId") Stri
})
@GetMapping("submissions/status/{status}")
public ResponseEntity<?> getSubmissionsbyStatus(@PathVariable("status") SubmissionStatus status) {
try {
ArrayList<Submission> submissions = (ArrayList<Submission>) submissionService.getSubmissionsByStatus(status);
return new ResponseEntity<>(stripUserDetails(submissions), HttpStatus.OK);
} catch (SubmissionDoesNotExistException ex) {
return new ResponseEntity<>(ex.getMessage(), HttpStatus.NOT_FOUND);
}
ArrayList<Submission> submissions = (ArrayList<Submission>) submissionService.getSubmissionsByStatus(status);
return new ResponseEntity<>(stripUserDetails(submissions), HttpStatus.OK);
}

@Operation(summary = "Given a submission id, this endpoint updates the processing status of the submission to the one provided",
Expand Down

0 comments on commit beacaf7

Please sign in to comment.