Added the ability to get tags from the database.

This commit is contained in:
2025-09-07 18:12:20 -04:00
parent 81db64f82e
commit 6b2866c10d
2 changed files with 11 additions and 1 deletions

View File

@ -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"

View File

@ -58,6 +58,16 @@ async fn get_database() -> Result<&'static Arc<Database>, ServerFnError>
#[server]
pub async fn get_tags(categories: Vec<String>) -> Result<Vec<String>, 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<String>) -> Result<Vec<Lore>, ServerFnError>
{