user nules
This commit is contained in:
@ -120,6 +120,11 @@ public class App {
|
||||
newuser.setSurname("Sad");
|
||||
newuser.setRole(UserRoles.STUDENT);
|
||||
this.userService.save(newuser);
|
||||
|
||||
newuser = new User();
|
||||
newuser.setEmail("iamnull@st.amu.edu.pl");
|
||||
newuser.setRole(UserRoles.STUDENT);
|
||||
this.userService.save(newuser);
|
||||
}
|
||||
|
||||
System.out.println(Logo.getStartedInfo(isDev));
|
||||
|
@ -47,7 +47,7 @@ public class UsersController {
|
||||
@PreAuthorize("hasRole('ROLE_DEANERY')")
|
||||
@ApiOperation(value = "Gets all students. You need token with DEANERY role to call this")
|
||||
public ResponseEntity<List<UserResponse>> getAllStudents() {
|
||||
final List<User> searches = this.userService.searchForStudents("");
|
||||
final List<User> searches = this.userService.getAllStudents();
|
||||
final List<UserResponse> response = UserResponseMappers.mapToDefaultResponse(searches);
|
||||
return new ResponseEntity<>(response, HttpStatus.OK);
|
||||
}
|
||||
|
Reference in New Issue
Block a user