main #10

Closed
student-20690 wants to merge 26 commits from (deleted):main into main
Showing only changes of commit 4a9e6633be - Show all commits

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();
} }
} }