login gRPC

This commit is contained in:
filipriec
2025-03-31 16:16:07 +02:00
parent 7f5b671084
commit e2c326bf1e
3 changed files with 28 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ use crate::tui::terminal::core::TerminalCore;
use crate::state::pages::{form::FormState, auth::AuthState};
use crate::state::state::AppState;
use crate::services::grpc_client::GrpcClient;
use crate::services::auth::AuthClient;
use crate::tui::functions::common::{
form::{save as form_save, revert},
login::{save as login_save, cancel}
@@ -14,6 +15,7 @@ pub async fn handle_core_action(
form_state: &mut FormState,
auth_state: &mut AuthState,
grpc_client: &mut GrpcClient,
auth_client: &mut AuthClient,
terminal: &mut TerminalCore,
app_state: &mut AppState,
current_position: &mut u64,
@@ -22,7 +24,7 @@ pub async fn handle_core_action(
match action {
"save" => {
if app_state.ui.show_login {
let message = login_save(auth_state, grpc_client).await?;
let message = login_save(auth_state, auth_client).await?;
Ok((false, message))
} else {
let message = form_save(