minor fix

This commit is contained in:
Zakharov_Rostislav 2024-05-29 19:36:04 +04:00
parent dabe92ea0a
commit 86b44795dd

View File

@ -3,6 +3,7 @@ package com.ip.library.users.api;
import java.util.List; import java.util.List;
import org.modelmapper.ModelMapper; import org.modelmapper.ModelMapper;
import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -12,9 +13,11 @@ import org.springframework.web.bind.annotation.RestController;
import com.ip.library.books.api.BookDto; import com.ip.library.books.api.BookDto;
import com.ip.library.books.model.BookEntity; import com.ip.library.books.model.BookEntity;
import com.ip.library.core.configuration.Constants; import com.ip.library.core.configuration.Constants;
import com.ip.library.users.model.UserRole;
import com.ip.library.users.service.UserService; import com.ip.library.users.service.UserService;
@RestController @RestController
@Secured(value = { UserRole.Secured.USER, UserRole.Secured.ADMIN })
@RequestMapping(Constants.API_URL + "/user/{userId}/book") @RequestMapping(Constants.API_URL + "/user/{userId}/book")
public class UserBookController { public class UserBookController {
private final UserService userService; private final UserService userService;