fix
This commit is contained in:
parent
09eb944c3f
commit
b2ff4dba32
|
|
@ -92,21 +92,13 @@ pub async fn python_cli_auth_login(
|
||||||
app: AppHandle,
|
app: AppHandle,
|
||||||
request: AuthLoginRequest,
|
request: AuthLoginRequest,
|
||||||
) -> Result<PythonCliResponse, String> {
|
) -> Result<PythonCliResponse, String> {
|
||||||
let mut args = vec!["auth".to_string(), "login".to_string(), request.username_or_email];
|
let mut args = vec!["auth".to_string(), "login".to_string(), request.username, request.password];
|
||||||
|
|
||||||
if let Some(password) = request.password {
|
if let Some(password) = request.password {
|
||||||
args.push("--password".to_string());
|
args.push("--password".to_string());
|
||||||
args.push(password);
|
args.push(password);
|
||||||
}
|
}
|
||||||
|
|
||||||
if request.verbose.unwrap_or(false) {
|
|
||||||
args.push("--verbose".to_string());
|
|
||||||
}
|
|
||||||
|
|
||||||
if request.json_output.unwrap_or(false) {
|
|
||||||
args.push("--json".to_string());
|
|
||||||
}
|
|
||||||
|
|
||||||
execute_python_cli_command(app, args, None).await
|
execute_python_cli_command(app, args, None).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,8 @@ class PythonCliAuth {
|
||||||
|
|
||||||
const response: PythonCliAuthResponse = await invoke('python_cli_auth_login', {
|
const response: PythonCliAuthResponse = await invoke('python_cli_auth_login', {
|
||||||
request: {
|
request: {
|
||||||
username_or_email,
|
username: credentials.username,
|
||||||
|
email: credentials.email,
|
||||||
password: credentials.password
|
password: credentials.password
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue