исправлена авторизация

This commit is contained in:
lynxwq2
2025-12-04 14:51:56 +03:00
parent 6703a935bb
commit 4a9e6633be

View File

@@ -33,14 +33,14 @@ public class EmployeeController {
} }
@GetMapping("/{code}/auth") @GetMapping("/{code}/auth")
public HttpStatus Isauth(@PathVariable String code) { public ResponseEntity<?> Isauth(@PathVariable String code) {
if (employeeService.isCodeValid(code)) { if (employeeService.isCodeValid(code)) {
return HttpStatus.OK; return ResponseEntity.ok().build();
} else if (!employeeService.isCodeValid(code)){ } else if (!employeeService.isCodeValid(code)){
return HttpStatus.UNAUTHORIZED; return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();
} else { } else {
return HttpStatus.BAD_REQUEST; return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
} }
} }