test(webapi): test room item posting and listing

This commit is contained in:
oxalica 2024-09-10 08:15:24 -04:00
parent 1a0347337c
commit c0ec429c24
3 changed files with 158 additions and 5 deletions

View file

@ -38,6 +38,12 @@ pub struct WithItemId<T> {
pub item: T,
}
impl<T> WithItemId<T> {
pub fn new(cid: Id, item: T) -> Self {
Self { cid, item }
}
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(transparent)]
pub struct UserKey(#[serde(with = "hex::serde")] pub [u8; PUBLIC_KEY_LENGTH]);