summaryrefslogtreecommitdiff
path: root/src/db/story.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/story.rs')
-rw-r--r--src/db/story.rs3
1 files changed, 2 insertions, 1 deletions
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<String>,
) -> Result<Self, AppError>
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",