minor edits
This commit is contained in:
parent
92414d74c8
commit
f97d1984e4
@ -26,6 +26,8 @@ public class UserBookController {
|
||||
private static final String BOOK_SEARCH_VIEW = "book-search";
|
||||
private static final String USER_FAVORITES_VIEW = "user-favorites";
|
||||
private static final String PAGE_ATTRIBUTE = "page";
|
||||
private static final String AUTHOR_ATTRIBUTE = "authorId";
|
||||
private static final String TYPE_ATTRIBUTE = "typeId";
|
||||
|
||||
private final UserService userService;
|
||||
private final BookService bookService;
|
||||
@ -84,8 +86,8 @@ public class UserBookController {
|
||||
@GetMapping(Constants.API_URL + "/search")
|
||||
public String getAll(
|
||||
@RequestParam(name = PAGE_ATTRIBUTE, defaultValue = "0") int page,
|
||||
@RequestParam(name = "typeId", defaultValue = "-1") Long typeId,
|
||||
@RequestParam(name = "authorId", defaultValue = "-1") Long authorId,
|
||||
@RequestParam(name = TYPE_ATTRIBUTE, defaultValue = "-1") Long typeId,
|
||||
@RequestParam(name = AUTHOR_ATTRIBUTE, defaultValue = "-1") Long authorId,
|
||||
Model model) {
|
||||
final Map<String, Object> attributes = PageAttributesMapper.toAttributes(
|
||||
bookService.getAll(typeId, authorId, page, Constants.DEFUALT_PAGE_SIZE),
|
||||
|
Loading…
Reference in New Issue
Block a user