From f731ff85e8f5326338d1eca54bee005edd82d118 Mon Sep 17 00:00:00 2001 From: jinno Yun Date: Sun, 22 Sep 2024 01:51:08 +0900 Subject: [PATCH] =?UTF-8?q?#21=20feat:=ED=8A=B9=EC=A0=95=20=EC=9D=B8?= =?UTF-8?q?=EC=A6=9D=EC=84=9C(pdf)=20=EC=82=AD=EC=A0=9C=ED=95=98=EB=8A=94?= =?UTF-8?q?=20API=20=EB=A9=94=ED=83=80=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/web3/s3Storage/controller/S3StorageController.java | 2 +- .../src/main/java/web3/s3Storage/service/S3StorageService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web3-credential-server/src/main/java/web3/s3Storage/controller/S3StorageController.java b/web3-credential-server/src/main/java/web3/s3Storage/controller/S3StorageController.java index 9b3f1ca..beaee59 100644 --- a/web3-credential-server/src/main/java/web3/s3Storage/controller/S3StorageController.java +++ b/web3-credential-server/src/main/java/web3/s3Storage/controller/S3StorageController.java @@ -69,7 +69,7 @@ public ResponseEntity 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(); diff --git a/web3-credential-server/src/main/java/web3/s3Storage/service/S3StorageService.java b/web3-credential-server/src/main/java/web3/s3Storage/service/S3StorageService.java index a95b293..5b9867f 100644 --- a/web3-credential-server/src/main/java/web3/s3Storage/service/S3StorageService.java +++ b/web3-credential-server/src/main/java/web3/s3Storage/service/S3StorageService.java @@ -351,7 +351,7 @@ public void deletePdfForPage(Wallet wallet, int pageNumberToRemove) throws IOExc byte[] finalPdfBytes = mergePdfs(frontPart,backPart); HashMap metadata = getPdfMetadata(fileName); - //메타데이터 수정 로직 필요 + metadata.remove("page-" + pageNumberToRemove); // 최종 PDF를 S3에 업로드 try {