buscar usuario por id
Some checks failed
Deploy Spring Boot App / build-and-deploy (push) Has been cancelled
Some checks failed
Deploy Spring Boot App / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -74,5 +74,14 @@ public class UsuarioService {
|
||||
repo.deleteById(id);
|
||||
}
|
||||
|
||||
//encontrar el usuario por gmail
|
||||
public Long findId(String username){
|
||||
Usuario usuario = repo.findByUsername(username)
|
||||
.orElseThrow(() -> new RuntimeException("Usuario no encontrado: " + username));
|
||||
|
||||
return usuario.getId();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user