Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#233 [fix] 지원서 다운로드 URL 생성 API 수정 #244

Merged
merged 4 commits into from
Feb 24, 2024
Merged

Conversation

KWY0218
Copy link
Member

@KWY0218 KWY0218 commented Feb 14, 2024

관련 이슈번호

해결하는 데 얼마나 걸렸나요? (예상 작업 시간 / 실제 작업 시간)

  • 1h / 1h

해결하려는 문제가 무엇인가요?

  • 지원서 다운로드 url 생성 api Post 에서 get으로 수정

어떻게 해결했나요?

  • 조회 application controller 와 service 분리하여 구현했습니다.

@KWY0218 KWY0218 added the fix label Feb 14, 2024
@KWY0218 KWY0218 self-assigned this Feb 14, 2024
Copy link
Member

@hellozo0 hellozo0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굳굳 수고하셨습니다~~!!
저는 원래.. 어제 오늘 작업 하려고 했는데 게으른 벼락치기생.....은 담주 화요일에 시험 끝나는데로 바로 다 끝낼께여... 제송함다..꾸벅꾸벅.. 흑흑....

@ApiResponse(responseCode = "404", description = "해당 지원서는 존재하지 않습니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
@ApiResponse(responseCode = "500", description = "서버 내부 오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
})
@GetMapping("/{applicationId}/download-url")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

기존 post -> get 으로 변경 확인했습니다!

@Parameter(hidden = true) @UserId final Long modelId,
@PathVariable final Long applicationId
) {
return SuccessResponse.success(GET_PRE_SIGNED_URL_SUCCESS, hairModelApplicationRetrieveService.getApplicationCaptureDownloadUrl(applicationId));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이부분에서 "디자이너 제안 상세보기 API에서 주는 applicationId를 사용해야 함" --> 해당 service 불러오기 확인했습니다!

Comment on lines +121 to +127
public DownloadUrlResponseDto getApplicationCaptureDownloadUrl(final Long applicationId) {
final HairModelApplication hairModelApplication = hairModelApplicationJpaRepository.findById(applicationId)
.orElseThrow(() -> new NotFoundException(ErrorCode.NOT_FOUND_APPLICATION_EXCEPTION));
final String applicationDownloadUrl = s3Service.getPreSignedUrlToDownload(hairModelApplication.getApplicationCaptureUrl());
return new DownloadUrlResponseDto(applicationDownloadUrl);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 지원서 아이디로 지원서 정보 조회하고 url정보 가져오는것 확인했습니다!

…into feat/#233

# Conflicts:
#	src/main/java/com/moddy/server/controller/application/ApplicationRetrieveController.java
#	src/main/java/com/moddy/server/controller/designer/DesignerRegisterController.java
#	src/main/java/com/moddy/server/service/application/HairModelApplicationRetrieveService.java
@KWY0218 KWY0218 merged commit 03d9c64 into develop Feb 24, 2024
1 check passed
@KWY0218 KWY0218 deleted the feat/#233 branch February 24, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] 지원서 다운로드 URL 생성 API 수정
2 participants