Api operations

This commit is contained in:
BuildTools
2020-11-04 16:58:26 +01:00
parent b308373062
commit 4818905422
7 changed files with 15 additions and 3 deletions

View File

@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -33,7 +34,7 @@ public class UsersController {
@GetMapping("/search")
@PreAuthorize("hasRole('ROLE_DEANERY')")
@ApiOperation(value = "Serch for user by providing query. If query is empty it will return all students. You need token with DEANERY role to call this")
public ResponseEntity<List<SearchForStudentsResponse>> configApp(@RequestParam("query") String query) {
final List<User> searches = this.userService.searchForStudents(query);
final List<SearchForStudentsResponse> response = UserResponseMappers.mapToDefaultResponse(searches);