generated from nhcarrigan/template
feat: expose org UUID from claude auth status
This commit is contained in:
@@ -1480,6 +1480,7 @@ pub async fn get_claude_version() -> Result<String, String> {
|
||||
pub struct ClaudeAuthStatus {
|
||||
pub is_logged_in: bool,
|
||||
pub email: Option<String>,
|
||||
pub org_id: Option<String>,
|
||||
pub org_name: Option<String>,
|
||||
pub api_key_source: Option<String>,
|
||||
pub api_provider: Option<String>,
|
||||
@@ -1510,6 +1511,11 @@ pub async fn get_auth_status() -> Result<ClaudeAuthStatus, String> {
|
||||
.and_then(|v| v.as_str())
|
||||
.map(String::from);
|
||||
|
||||
let org_id = json
|
||||
.get("orgId")
|
||||
.and_then(|v| v.as_str())
|
||||
.map(String::from);
|
||||
|
||||
let org_name = json
|
||||
.get("orgName")
|
||||
.and_then(|v| v.as_str())
|
||||
@@ -1534,6 +1540,7 @@ pub async fn get_auth_status() -> Result<ClaudeAuthStatus, String> {
|
||||
Ok(ClaudeAuthStatus {
|
||||
is_logged_in,
|
||||
email,
|
||||
org_id,
|
||||
org_name,
|
||||
api_key_source,
|
||||
api_provider,
|
||||
@@ -1550,6 +1557,7 @@ pub async fn get_auth_status() -> Result<ClaudeAuthStatus, String> {
|
||||
Ok(ClaudeAuthStatus {
|
||||
is_logged_in,
|
||||
email: None,
|
||||
org_id: None,
|
||||
org_name: None,
|
||||
api_key_source: None,
|
||||
api_provider: None,
|
||||
|
||||
Reference in New Issue
Block a user