forked from Olympic/NTO-2025-Backend-TeamTask
112
This commit is contained in:
@@ -23,8 +23,11 @@ public class EmployeeController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private EmployeeService employeeService;
|
private EmployeeService employeeService;
|
||||||
@GetMapping("/{code}/auth")
|
@GetMapping("/{code}/auth")
|
||||||
public ResponseEntity<Void> checkAuth(
|
public ResponseEntity<Void> checkAuth(
|
||||||
@PathVariable String code) {
|
@PathVariable String code) {
|
||||||
|
if (code==null){
|
||||||
|
throw new IllegalArgumentException("Employee code is required");
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
employeeService.getEmployeeByCode(code);
|
employeeService.getEmployeeByCode(code);
|
||||||
return ResponseEntity.ok().build();
|
return ResponseEntity.ok().build();
|
||||||
|
|||||||
Reference in New Issue
Block a user