last commit
This commit is contained in:
parent
2fef942c52
commit
7292491328
@ -34,7 +34,7 @@ public class EmployeeController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// @PreAuthorize("hasAuthority('ROLE_ADMIN')")
|
// @PreAuthorize("hasAuthority('ROLE_ADMIN')")
|
||||||
@PutMapping("/ban")
|
@GetMapping("/ban")
|
||||||
public void ban(@RequestParam final String login) {
|
public void ban(@RequestParam final String login) {
|
||||||
employeeService.banEmployee(login);
|
employeeService.banEmployee(login);
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ public class EmployeeServiceImpl implements EmployeeService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Employee getEmployee(final String login) {
|
public Employee getEmployee(final String login) {
|
||||||
var encoder = new BCryptPasswordEncoder();
|
|
||||||
if (!employeeRepository.existsByLogin(login)) {
|
if (!employeeRepository.existsByLogin(login)) {
|
||||||
throw new EmployeeNotFoundException();
|
throw new EmployeeNotFoundException();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user