diff --git a/bard/Cargo.toml b/bard/Cargo.toml index 5d10e57..f05af0d 100644 --- a/bard/Cargo.toml +++ b/bard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bard" -version = "0.0.7" +version = "0.0.8" edition = "2024" description = "Dioxus components that will display a Tavern blogging system Blog." repository = "/CyberMages/tavern" diff --git a/bard/src/server.rs b/bard/src/server.rs index c4f4e05..36b9cb4 100644 --- a/bard/src/server.rs +++ b/bard/src/server.rs @@ -58,6 +58,16 @@ async fn get_database() -> Result<&'static Arc, ServerFnError> +#[server] +pub async fn get_tags(categories: Vec) -> Result, ServerFnError> +{ + let db = get_database().await?; + + let tags = db.get_all_tags().await.map_err(|e| ServerFnError::new(e))?; + + Ok(tags) +} + #[server] pub async fn get_blog_list(categories: Vec) -> Result, ServerFnError> {