aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/users.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/users.rs')
-rw-r--r--src/api/users.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/users.rs b/src/api/users.rs
index 66b6a8b..f27eff1 100644
--- a/src/api/users.rs
+++ b/src/api/users.rs
@@ -48,7 +48,7 @@ use tracing::info;
use super::ApiError;
use super::access::{Access, Before, registry_kept};
use super::auth::AuthenticatedUser;
-use crate::access::{Right, registry};
+use crate::access::{Right, envelope, registry};
use crate::document::store;
use crate::state::AppState;
@@ -153,7 +153,7 @@ pub(crate) async fn own_keys(
.flatten()
.ok_or_else(|| ApiError(StatusCode::NOT_FOUND, Some("no entry of yours".to_owned())))?;
let signed = match store::read_path(&replica.doc, &path) {
- Ok(Some(JsonValue::String(text))) if text.starts_with(store::ENVELOPE) => Some(text),
+ Ok(Some(JsonValue::String(text))) if envelope::read(&text).is_ok() => Some(text),
_ => None,
};
Ok(Json(json!({