Skip to content

Commit

Permalink
#21 이전 브랜치 연동
Browse files Browse the repository at this point in the history
  • Loading branch information
jinno321 committed Oct 9, 2024
1 parent 95d923d commit 1bf1b72
Show file tree
Hide file tree
Showing 2 changed files with 147 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,9 @@ public ResponseEntity<String> uploadPdf(
@Parameter(description = "pdf 키값",required = true)
@RequestParam String pdfKey) {
Wallet wallet = walletService.getWalletById(walletId).orElseThrow(()-> new EntityNotFoundException("Wallet does not exist"));
try {
String pdfUrl = s3StorageService.uploadPdf(file, wallet,pdfInfo,pdfKey);
return ResponseEntity.ok(pdfUrl);
} catch (IOException e) {
e.printStackTrace();
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Failed to upload pdf: " + e.getMessage());
}
String pdfUrl = s3StorageService.uploadPdf(file, wallet,pdfInfo,pdfKey);
return ResponseEntity.ok(pdfUrl);

}


Expand Down Expand Up @@ -114,15 +110,12 @@ public ResponseEntity<String> replacePdf(
@RequestParam("page") int page,
@Parameter(description = "사용자 지갑ID",required = true)
@RequestParam("walletId") Long walletId) {
try {
System.out.println("file = " + file);
Wallet wallet = walletService.getWalletById(walletId).orElseThrow(()-> new EntityNotFoundException("Wallet does not exist"));
String pdfUrl = s3StorageService.replacePdfPage(wallet, page, file);
return ResponseEntity.ok(pdfUrl);
}catch(IOException e) {
e.printStackTrace();
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Failed to replace pdf: " + e.getMessage());
}

System.out.println("file = " + file);
Wallet wallet = walletService.getWalletById(walletId).orElseThrow(()-> new EntityNotFoundException("Wallet does not exist"));
String pdfUrl = s3StorageService.replacePdfPage(wallet, page, file);
return ResponseEntity.ok(pdfUrl);

}

@Operation(summary = "메타데이터 얻기",description = "사용자의 모든 메타데이터의 정보들을 가져옵니다.")
Expand Down
Loading

0 comments on commit 1bf1b72

Please sign in to comment.