diff --git a/src/helpers/comments_helper.rs b/src/helpers/comments_helper.rs index ed7a733..8bf24f6 100644 --- a/src/helpers/comments_helper.rs +++ b/src/helpers/comments_helper.rs @@ -57,7 +57,8 @@ fn db_to_comment(row: &database::RowResult) -> ResultBoxError { user_id: row.get_user_id("ID_personne")?, post_id: row.get_u64("ID_texte")?, content: row.get_str("commentaire")?, - image_path: row.get_optional_str("image_commentaire")?, + image_path: row.get_optional_str("image_commentaire")? + .map(|f| f.replace("file:", "")), }) }