X-Git-Url: http://git.euphorik.ch/?p=recipes.git;a=blobdiff_plain;f=backend%2Fsrc%2Fdata%2Fasynchronous.rs;fp=backend%2Fsrc%2Fdata%2Fasynchronous.rs;h=186dad629c33f3c265b3fcd853299075b5e3d8ee;hp=a5a5cdf6c0928287bd0cf438a89b094a1d91ee47;hb=cbe276fc0601041b13087a6ffd80c5b126dfbe59;hpb=642dd8a80ce2e1212b8e30c1edabb32bdb416cfc diff --git a/backend/src/data/asynchronous.rs b/backend/src/data/asynchronous.rs index a5a5cdf..186dad6 100644 --- a/backend/src/data/asynchronous.rs +++ b/backend/src/data/asynchronous.rs @@ -112,4 +112,10 @@ impl Connection { let title_copy = title.to_string(); combine_errors(web::block(move || { self_copy.set_recipe_title(recipe_id, &title_copy).map_err(DBAsyncError::from) }).await) } + + pub async fn set_recipe_description_async(&self, recipe_id: i64, description: &str) -> Result<()> { + let self_copy = self.clone(); + let description_copy = description.to_string(); + combine_errors(web::block(move || { self_copy.set_recipe_description(recipe_id, &description_copy).map_err(DBAsyncError::from) }).await) + } } \ No newline at end of file