From 99fc959383d5b7b26d8e80f6257adf8b98989f41 Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Thu, 7 Nov 2024 17:06:03 +0100 Subject: Feat: Add ability to add tags to story (and product in general) --- src/db/story.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/db/story.rs') diff --git a/src/db/story.rs b/src/db/story.rs index b77d7a3..137c964 100644 --- a/src/db/story.rs +++ b/src/db/story.rs @@ -78,12 +78,13 @@ impl ProductDatabaseHandler for Story { pool: &SqlitePool, name: String, description: String, + tags: Vec, ) -> Result where Self: Sized, { let mut tx = pool.begin().await?; - let product = Product::post(&mut tx, name, description).await?; + let product = Product::post(&mut tx, name, description, tags).await?; let story = sqlx::query_as!( Story, "INSERT INTO story (language, pdf, epub, pid) VALUES ($1, $2, $3, $4) RETURNING id, language, pdf, epub, pid", -- cgit v1.2.3