main #8

Closed
student-18211 wants to merge 22 commits from student-18211/NTO-2025-Backend-TeamTask:main into main
Showing only changes of commit c4bb98b321 - Show all commits

View File

@@ -22,6 +22,18 @@ import java.util.stream.Collectors;
public class EmployeeController {
@Autowired
private EmployeeService employeeService;
@GetMapping("/{code}/auth")
public ResponseEntity<Void> checkAuth(
@PathVariable String code) {
try {
employeeService.getEmployeeByCode(code);
return ResponseEntity.ok().build();
} catch (IllegalArgumentException e) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
} catch (EmployeeNotFoundException e) {
return ResponseEntity.status(HttpStatus.NOT_FOUND).build();
}
}
@GetMapping("/{code}/info")
public ResponseEntity<?> getEmployeeInfo(@PathVariable String code) {
try {