Commit b02af0b2 by Rubén Ramírez

feat: [RepositorioUsuario]: Creada función en repositorio para buscar por id a un usuario

parent b171837b
......@@ -54,8 +54,10 @@ public class RepositorioUsuario {
.findFirst();
}
public Usuario findById(Long usuarioId) {
return em.find(Usuario.class, usuarioId);
public Optional<Usuario> findById(Long id) {
Usuario usuario = em.find(Usuario.class, id);
return Optional.ofNullable(usuario);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment