Skip to content
Extraits de code Groupes Projets
Valider 3b2251eb rédigé par safae.rabbouzi's avatar safae.rabbouzi
Parcourir les fichiers

edit the isAgentExists

parent 2c203faa
Branches
1 requête de fusion!5MLC-253/edit the isAgentExists method
......@@ -42,7 +42,7 @@ public interface AgentService {
AgentResponseDTO getAgentById(Long id) throws FunctionalException;
public boolean isAgentExists(Long agentId) throws FunctionalException;
public boolean isAgentExists(Long agentId);
public ManagerResponseDTO getManagerById(Long agentId) throws FunctionalException;
......
......@@ -231,11 +231,8 @@ public class AgentServiceImpl implements AgentService {
@Override
@Transactional(readOnly = true)
public boolean isAgentExists(Long agentId) throws FunctionalException {
if (!agentRepository.existsById(agentId)) {
throw new FunctionalException(Message.USER_NOT_FOUND + agentId);
}
return false;
public boolean isAgentExists(Long agentId){
return agentRepository.existsById(agentId);
}
@Override
......
0% ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter