in src/main/java/com/company/example/web/bookshop/VertxBookShopREST.java [84:99]
private void handleAddBook(RoutingContext routingContext) {
String bookId = routingContext.request().getParam("bookId");
HttpServerResponse response = routingContext.response();
if (bookId == null) {
response.setStatusCode(400).end();
} else {
JsonObject book = routingContext.getBodyAsJson();
if (book == null) {
response.setStatusCode(400).end();
} else {
addBook(book);
response.end();
}
}
}