Skip to content

Commit

Permalink
[Feat] etc 파일 선택사항으로 변경 (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
JIHYUN2EE authored Sep 6, 2024
1 parent e29ffac commit bbeaae5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public ResponseEntity<Void> registerCharge(@PathVariable Long petId, @RequestBod
public ResponseEntity<Map<String, String>> uploadDocuments(
@RequestPart("receipt") MultipartFile receipt,
@RequestPart("medicalExpenses") MultipartFile medicalExpenses,
@RequestPart("etc") MultipartFile etc) {
@RequestPart(value = "etc", required = false) MultipartFile etc) {

Map<String, String> urls = chargeService.uploadDocuments(receipt, medicalExpenses, etc);
return ResponseEntity.status(HttpStatus.CREATED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public Map<String, String> uploadDocuments(MultipartFile receipt, MultipartFile
Map<String, String> urls = new HashMap<>();
urls.put("receiptUrl", receiptUrl);
urls.put("medicalExpensesUrl", medicalExpensesUrl);
urls.put("etcUrl", etcUrl);
if (etcUrl != null) {
urls.put("etcUrl", etcUrl);
}

return urls;
}
Expand Down

0 comments on commit bbeaae5

Please sign in to comment.