feat(api): add error handling for save endpoint

This commit is contained in:
2026-06-19 22:04:42 +01:00
parent 5b997cb945
commit b55ba3ce51
3 changed files with 50 additions and 45 deletions

View File

@@ -50,7 +50,7 @@ public class StreamController {
public ResponseEntity<APIResponse<Void>> saveSection(
@RequestBody SaveSectionRequest request) throws IOException, InterruptedException {
streamService.saveSection(request.startTime(), request.endTime());
return ResponseEntity.ok(new APIResponse<>("success", "Section saved", null));
return ResponseEntity.accepted().body(new APIResponse<>("success", "Section saved", null));
}
@GetMapping("/history/{userId}")