From d9a4fcd939974299322586c0beed1de7505d8d3d Mon Sep 17 00:00:00 2001 From: Vika Date: Thu, 22 Jun 2023 20:18:59 +0300 Subject: kittybox-util: Derive sqlx::FromRow on MicropubChannel --- kittybox-rs/util/Cargo.toml | 4 ++++ kittybox-rs/util/src/lib.rs | 1 + 2 files changed, 5 insertions(+) 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, -- cgit 1.4.1