diff options
author | Vika <vika@fireburn.ru> | 2023-06-22 21:35:22 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2023-06-22 21:35:22 +0300 |
commit | 858c0ddd9cc36af0acc72efb1ff1bdc1d8e28b0a (patch) | |
tree | 5b46bcc88e37fa0e23fea4f49c0242ad21662bca /kittybox-rs/src/database/mod.rs | |
parent | d61e1f6a8e5ad5b7c14b1f9ab3101496f3f9ea00 (diff) | |
download | kittybox-858c0ddd9cc36af0acc72efb1ff1bdc1d8e28b0a.tar.zst |
database: use domains instead of authorities as owner key
This allows disregarding http/https comparisons and simplifies some database designs.
Diffstat (limited to 'kittybox-rs/src/database/mod.rs')
-rw-r--r-- | kittybox-rs/src/database/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kittybox-rs/src/database/mod.rs b/kittybox-rs/src/database/mod.rs index 4b1b348..aa675d3 100644 --- a/kittybox-rs/src/database/mod.rs +++ b/kittybox-rs/src/database/mod.rs @@ -370,7 +370,7 @@ mod tests { // Reading and writing backend - .put_post(&post, "https://fireburn.ru/") + .put_post(&post, "fireburn.ru") .await .unwrap(); if let Some(returned_post) = backend.get_post(&key).await.unwrap() { @@ -434,7 +434,7 @@ mod tests { // Reading and writing backend - .put_post(&post, "https://fireburn.ru/") + .put_post(&post, "fireburn.ru") .await .unwrap(); @@ -493,10 +493,10 @@ mod tests { "children": [] }); backend - .put_post(&feed, "https://fireburn.ru/") + .put_post(&feed, "fireburn.ru") .await .unwrap(); - let chans = backend.get_channels("https://fireburn.ru/").await.unwrap(); + let chans = backend.get_channels("fireburn.ru").await.unwrap(); assert_eq!(chans.len(), 1); assert_eq!( chans[0], @@ -566,13 +566,13 @@ mod tests { let key = feed["properties"]["uid"][0].as_str().unwrap(); backend - .put_post(&feed, "https://fireburn.ru/") + .put_post(&feed, "fireburn.ru") .await .unwrap(); println!("---"); for (i, post) in posts.iter().enumerate() { backend - .put_post(post, "https://fireburn.ru/") + .put_post(post, "fireburn.ru") .await .unwrap(); println!("posts[{}] = {}", i, post["properties"]["uid"][0]); |