File tree Expand file tree Collapse file tree
src/main/java/refresh/acci/domain/analysis Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,10 @@ public class AnalysisService {
3737 public AnalysisUploadResponse anaylze (MultipartFile video , CustomUserDetails userDetails ) {
3838 if (video == null || video .isEmpty ()) throw new CustomException (ErrorCode .VIDEO_FILE_MISSING );
3939
40- Analysis analysis = analysisCommandService .saveAndFlushNewAnalysis (Analysis .of (userDetails .getId ()));
40+ Long userId = null ;
41+ if (userDetails != null ) userId = userDetails .getId ();
42+
43+ Analysis analysis = analysisCommandService .saveAndFlushNewAnalysis (Analysis .of (userId ));
4144
4245 // 임시 파일로 저장 후 비동기 분석 작업 실행
4346 Path tempFilePath = tempVideoStore .saveToTempFile (video , analysis .getId ());
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public class Analysis {
2222 @ Column (columnDefinition = "BINARY(16)" )
2323 private UUID id ;
2424
25- @ Column (name = "user_id" , nullable = false )
25+ @ Column (name = "user_id" )
2626 private Long userId ;
2727
2828 @ Column (name = "accident_rate" )
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public SseEmitter subscribe(@PathVariable UUID analysisId) {
3838 }
3939
4040 // 랜덤 Tip 제공
41- @ GetMapping ("/loading" )
41+ @ GetMapping (value = "/loading" , produces = MediaType . TEXT_PLAIN_VALUE )
4242 public ResponseEntity <String > getLoadingTips () {
4343 return ResponseEntity .status (HttpStatus .OK ).body (analysisService .getLoadingTips ());
4444 }
You can’t perform that action at this time.
0 commit comments