Include cid in item responses and update docs

This commit is contained in:
oxalica 2024-09-06 02:26:14 -04:00
parent a7f260027d
commit 51e2c8418b
3 changed files with 53 additions and 49 deletions

View file

@ -24,6 +24,13 @@ impl fmt::Display for Id {
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct WithItemId<T> {
pub cid: Id,
#[serde(flatten)]
pub item: T,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(transparent)]
pub struct UserKey(#[serde(with = "hex::serde")] pub [u8; PUBLIC_KEY_LENGTH]);