Jalen Francis 2 weeks ago
committed by GitHub
parent
commit
45d2cb957f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      src/db/models/send.rs

4
src/db/models/send.rs

@ -131,6 +131,9 @@ impl Send {
data["size"] = Value::String(size.to_string());
}
// Determine authType based on Bitwarden's AuthType enum: Email=0, Password=1, None=2
let auth_type = if self.password_hash.is_some() { 1 } else { 2 };
json!({
"id": self.uuid,
"accessId": BASE64URL_NOPAD.encode(Uuid::parse_str(&self.uuid).unwrap_or_default().as_bytes()),
@ -145,6 +148,7 @@ impl Send {
"maxAccessCount": self.max_access_count,
"accessCount": self.access_count,
"password": self.password_hash.as_deref().map(|h| BASE64URL_NOPAD.encode(h)),
"authType": auth_type,
"disabled": self.disabled,
"hideEmail": self.hide_email,

Loading…
Cancel
Save