Skip to content

Commit da30e56

Browse files
committed
fix: set totalduration to second
1 parent 5b2938a commit da30e56

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

src/main/java/com/climbup/climbup/attempt/controller/AttemptController.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import io.swagger.v3.oas.annotations.tags.Tag;
2525
import jakarta.validation.Valid;
2626
import lombok.RequiredArgsConstructor;
27-
import lombok.extern.slf4j.Slf4j;
2827

2928
import org.springframework.data.domain.Page;
3029
import org.springframework.data.domain.PageRequest;
@@ -40,7 +39,6 @@
4039
import java.util.List;
4140
import java.util.UUID;
4241

43-
@Slf4j
4442
@RestController
4543
@RequestMapping("/api/attempts")
4644
@Tag(name = "Attempts", description = "루트 미션 도전 관련 API")
@@ -171,13 +169,6 @@ public ResponseEntity<ApiResult<RouteMissionUploadSessionFinalizeResponse>> fina
171169
@PathVariable(name = "uploadId") UUID uploadId,
172170
@RequestPart(value = "thumbnail", required = false) MultipartFile thumbnailFile
173171
) {
174-
// 디버깅 로그 추가
175-
log.info("=== Finalize API 호출됨 ===");
176-
log.info("attemptId: {}, uploadId: {}", attemptId, uploadId);
177-
log.info("thumbnailFile: {}", thumbnailFile != null ? "존재함" : "null");
178-
if (thumbnailFile != null) {
179-
log.info("thumbnail 크기: {}, 파일명: {}", thumbnailFile.getSize(), thumbnailFile.getOriginalFilename());
180-
}
181172
RouteMissionUploadSessionFinalizeResponse response = attemptService.finalizeUploadSession(uploadId, thumbnailFile);
182173
return ResponseEntity.ok(ApiResult.success(response));
183174
}

src/main/java/com/climbup/climbup/attempt/service/AttemptServiceImpl.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -347,29 +347,13 @@ public RouteMissionUploadSessionFinalizeResponse finalizeUploadSession(UUID uplo
347347

348348
try {
349349
String videoUrl = uploadService.uploadVideo(finalVideoPath, "attempts");
350-
log.info("Video uploaded successfully: {}", videoUrl);
351-
352-
log.info("=== Service 레벨 디버깅 ===");
353-
log.info("uploadId: {}", uploadId);
354-
log.info("thumbnailFile null 여부: {}", thumbnailFile == null);
355-
356-
if (thumbnailFile != null) {
357-
log.info("thumbnailFile.isEmpty(): {}", thumbnailFile.isEmpty());
358-
log.info("thumbnailFile.getSize(): {}", thumbnailFile.getSize());
359-
log.info("thumbnailFile.getContentType(): {}", thumbnailFile.getContentType());
360-
log.info("thumbnailFile.getOriginalFilename(): {}", thumbnailFile.getOriginalFilename());
361-
}
362350

363351
String thumbnailUrl = null;
364352
boolean thumbnailUploaded = false;
365353

366354
if (thumbnailFile != null && !thumbnailFile.isEmpty()) {
367-
log.info("썸네일 업로드 시도 시작...");
368355
thumbnailUrl = uploadService.uploadMultipartFile(thumbnailFile, "attempts", "images");
369356
thumbnailUploaded = true;
370-
log.info("Thumbnail uploaded successfully: {}", thumbnailUrl);
371-
} else {
372-
log.warn("썸네일 파일이 null이거나 비어있음");
373357
}
374358

375359
attempt.setVideoUrl(videoUrl);

src/main/java/com/climbup/climbup/session/service/UserSessionServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public UserSession finishSession(Long userId, Long sessionId) {
8989
session.setEndedAt(endTime);
9090

9191
Duration duration = Duration.between(session.getStartedAt(), endTime);
92-
session.setTotalDuration((int) duration.toMinutes());
92+
session.setTotalDuration((int) duration.getSeconds());
9393

9494
userSessionRepository.save(session);
9595

0 commit comments

Comments
 (0)