This commit is contained in:
aditya.chandel
2025-02-13 03:48:53 -07:00
parent 883154cffe
commit cd12ff3f49
6 changed files with 17 additions and 12 deletions
@@ -47,12 +47,12 @@ public class BookController {
return booksService.downloadBook(bookId);
}
@GetMapping("/{bookId}/viewer-settings")
@GetMapping("/{bookId}/viewer-setting")
public ResponseEntity<BookViewerSettings> getBookViewerSettings(@PathVariable long bookId) {
return ResponseEntity.ok(booksService.getBookViewerSetting(bookId));
}
@PutMapping("/{bookId}/viewer-settings")
@PutMapping("/{bookId}/viewer-setting")
public ResponseEntity<Void> updateBookViewerSettings(@RequestBody BookViewerSettings bookViewerSettings, @PathVariable long bookId) {
booksService.updateBookViewerSetting(bookId, bookViewerSettings);
return ResponseEntity.noContent().build();
@@ -1,3 +1,5 @@
app:
path-book: '/Users/aditya.chandel/my-library-temp/books'
path-config: '/Users/aditya.chandel/my-library-temp/config/local'
@@ -15,7 +17,7 @@ spring:
name: booklore-api
datasource:
driver-class-name: org.h2.Driver
url: 'jdbc:h2:tcp://localhost:9092/~/my-library-temp/config/local/db/booklore'
url: 'jdbc:h2:tcp://localhost:8040/~/my-library-temp/config/local/db/booklore'
username: sa
password: password
jpa:
@@ -37,4 +39,7 @@ logging:
level:
root: INFO
org.apache.fontbox: ERROR
org.apache.pdfbox: ERROR
org.apache.pdfbox: ERROR
server:
port: 7050