Skip to content

Commit

Permalink
Merge pull request #271 from TEAM-MODDY/fix/#270
Browse files Browse the repository at this point in the history
#270 [fix] 지원서 작성하기의 response data 형태 변경
  • Loading branch information
hellozo0 authored Mar 6, 2024
2 parents fd88da8 + aef9108 commit ce32eae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.moddy.server.controller.application.dto.response;

public record ApplicationExpireDateResponse(
String expireDate
String expirationDate
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class HairModelApplicationRegisterService {
private final PreferHairStyleJpaRepository preferHairStyleJpaRepository;
private final HairServiceRecordJpaRepository hairServiceRecordJpaRepository;
private final ModelJpaRepository modelJpaRepository;
private static final String DATE_FORMAT = "yyyy. MM. dd";

@Transactional
public ApplicationExpireDateResponse postApplication(final Long modelId, final MultipartFile modelImgUrl, final MultipartFile applicationCaptureImgUrl, final ModelApplicationRequest applicationInfo) {
Expand All @@ -42,7 +43,7 @@ public ApplicationExpireDateResponse postApplication(final Long modelId, final M
savePreferHairStyles(applicationInfo, hairModelApplication);
saveHairServiceRecords(applicationInfo, hairModelApplication);

return new ApplicationExpireDateResponse(hairModelApplication.getExpiredDate().format(DateTimeFormatter.ofPattern("yyyy. MM. dd.")));
return new ApplicationExpireDateResponse(hairModelApplication.getCreatedDate().format(DateTimeFormatter.ofPattern(DATE_FORMAT)) + " - " + hairModelApplication.getExpiredDate().format(DateTimeFormatter.ofPattern(DATE_FORMAT)));
}

@Transactional
Expand Down

0 comments on commit ce32eae

Please sign in to comment.