Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Created and implemented 'available' value in liquibase
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-hellen committed Apr 10, 2024
1 parent d4471b1 commit fddfd15
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/org/folio/sample/controller/BookController.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,13 @@ public ResponseEntity<BookDTO> updateBook(UUID bookId, BookForCreationDTO newBoo
HttpStatus.OK
);
}

public ResponseEntity<List<BookDTO>> getAllAvailable() {
log.info("Called GET /books/available");

return new ResponseEntity<>(
bookService.findAllAvailable().stream().map(bookMapper::toDto).toList(),
HttpStatus.OK
);
}
}

0 comments on commit fddfd15

Please sign in to comment.