Skip to content

Commit

Permalink
#21 feat:특정 인증서(pdf) 삭제하는 API 메타데이터 수정 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jinno321 committed Sep 21, 2024
1 parent a0b6582 commit f731ff8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ResponseEntity<Void> deleteCertForPage(
@Parameter(description = "지울 지갑 ID",required = true)
@RequestBody Long walletId,
@Parameter(description = "지울 페이지 번호",required = true)
@RequestBody int page) {
@RequestBody int page) throws IOException {
Wallet wallet = walletService.getWalletById(walletId).orElseThrow(()-> new EntityNotFoundException("Wallet does not exist"));
s3StorageService.deletePdfForPage(wallet,page);
return ResponseEntity.noContent().build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public void deletePdfForPage(Wallet wallet, int pageNumberToRemove) throws IOExc
byte[] finalPdfBytes = mergePdfs(frontPart,backPart);
HashMap<String, String> metadata = getPdfMetadata(fileName);

//메타데이터 수정 로직 필요
metadata.remove("page-" + pageNumberToRemove);

// 최종 PDF를 S3에 업로드
try {
Expand Down

0 comments on commit f731ff8

Please sign in to comment.