Skip to content

Commit 56c8066

Browse files
authored
Identity type (#368)
1 parent 23a96ab commit 56c8066

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/web/data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ pub struct BillCombinedBitcoinKey {
253253
#[derive(Debug, Serialize, Deserialize, ToSchema)]
254254
pub struct SwitchIdentity {
255255
#[serde(rename = "type")]
256-
pub t: IdentityType,
256+
pub t: Option<IdentityType>,
257257
pub node_id: String,
258258
}
259259

src/web/handlers/identity.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,10 @@ pub async fn active(state: &State<ServiceContext>) -> Result<Json<SwitchIdentity
172172
None => (current_identity_state.personal, IdentityType::Person),
173173
Some(company_node_id) => (company_node_id, IdentityType::Company),
174174
};
175-
Ok(Json(SwitchIdentity { t, node_id }))
175+
Ok(Json(SwitchIdentity {
176+
t: Some(t),
177+
node_id,
178+
}))
176179
}
177180

178181
#[utoipa::path(

0 commit comments

Comments
 (0)