Remade code process
This commit is contained in:
parent
2d88b38796
commit
fe051bb26a
@ -68,6 +68,9 @@ public class EmployeeCodeServiceImpl implements EmployeeService, CodeService {
|
||||
code.setId(employeeId);
|
||||
} else {
|
||||
code = codeOptional.get();
|
||||
if (code.getValue() != newCode.getValue()) {
|
||||
throw new ResponseStatusException(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
code.setValue(newCode.getValue());
|
||||
}
|
||||
return codeRepository.save(code);
|
||||
|
Loading…
x
Reference in New Issue
Block a user