fix: Employee entity and controller
This commit is contained in:
parent
f6ca912ed1
commit
105d028fa8
@ -17,6 +17,7 @@ public class AuthorizationController {
|
|||||||
|
|
||||||
@GetMapping("/login")
|
@GetMapping("/login")
|
||||||
public ResponseEntity<EmployeeDTO> login(Authentication authentication) {
|
public ResponseEntity<EmployeeDTO> login(Authentication authentication) {
|
||||||
|
|
||||||
return ResponseEntity.ok(employeeService.getByEmail(authentication.getName()));
|
return ResponseEntity.ok(employeeService.getByEmail(authentication.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,5 +65,4 @@ public class EmployeeController {
|
|||||||
employeeService.patchBlockEmployee(employeeId, blockStatus);
|
employeeService.patchBlockEmployee(employeeId, blockStatus);
|
||||||
return ResponseEntity.noContent().build();
|
return ResponseEntity.noContent().build();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -94,11 +94,6 @@ public class Employee implements UserDetails {
|
|||||||
return List.of(this.role);
|
return List.of(this.role);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getPassword() {
|
|
||||||
return this.password;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUsername() {
|
public String getUsername() {
|
||||||
return this.email;
|
return this.email;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user