about summary refs log tree commit diff
path: root/kittybox-rs/util
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2023-06-22 20:18:59 +0300
committerVika <vika@fireburn.ru>2023-06-22 20:18:59 +0300
commitd9a4fcd939974299322586c0beed1de7505d8d3d (patch)
treed19f55109f4421dabb768059a23fbd515f376b15 /kittybox-rs/util
parent8b1f39e5b30b5a3bad0f95d92a5909992139aca2 (diff)
downloadkittybox-d9a4fcd939974299322586c0beed1de7505d8d3d.tar.zst
kittybox-util: Derive sqlx::FromRow on MicropubChannel
Diffstat (limited to 'kittybox-rs/util')
-rw-r--r--kittybox-rs/util/Cargo.toml4
-rw-r--r--kittybox-rs/util/src/lib.rs1
2 files changed, 5 insertions, 0 deletions
diff --git a/kittybox-rs/util/Cargo.toml b/kittybox-rs/util/Cargo.toml
index f36b6d8..b0b725c 100644
--- a/kittybox-rs/util/Cargo.toml
+++ b/kittybox-rs/util/Cargo.toml
@@ -20,3 +20,7 @@ optional = true
 version = "^1.16.1"
 features = ["tracing"]
 optional = true
+[dependencies.sqlx]
+version = "0.6"
+features = ["json"]
+optional = true
\ No newline at end of file
diff --git a/kittybox-rs/util/src/lib.rs b/kittybox-rs/util/src/lib.rs
index f30dc2d..1c2f6f7 100644
--- a/kittybox-rs/util/src/lib.rs
+++ b/kittybox-rs/util/src/lib.rs
@@ -16,6 +16,7 @@ pub struct IndiewebEndpoints {
 
 /// Data structure representing a Micropub channel in the ?q=channels output.
 #[derive(Serialize, Deserialize, PartialEq, Debug)]
+#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
 pub struct MicropubChannel {
     /// The channel's UID. It is usually also a publically accessible permalink URL.
     pub uid: String,