Fix pdf viewer when opening in docker.

Have envs for angular.
This commit is contained in:
aditya.chandel
2025-01-22 18:30:28 -07:00
parent df6d756dc5
commit 156e2439aa
9 changed files with 37 additions and 9 deletions
@@ -102,7 +102,7 @@ public class BooksService {
BookEntity bookEntity = bookRepository.findById(bookId).orElseThrow(() -> ApiError.BOOK_NOT_FOUND.createException(bookId));
byte[] pdfBytes = Files.readAllBytes(new File(FileUtils.getBookFullPath(bookEntity)).toPath());
return ResponseEntity.ok()
.header(HttpHeaders.CONTENT_TYPE, "application/pdf")
.header(HttpHeaders.CONTENT_TYPE, "text/plain")
.body(pdfBytes);
}
@@ -15,7 +15,7 @@ spring:
name: booklore-api
datasource:
driver-class-name: org.h2.Driver
url: jdbc:h2:~/my-library-temp/config/db/booklore
url: jdbc:h2:~/my-library-temp/config/local/db/booklore
username: sa
password: password
jpa: