From 462c5a1d424e15eee43644a8b2c6a2f5ae6d0eda Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Wed, 24 Feb 2021 01:04:31 +0900 Subject: [PATCH] Define Media::find_by_file_path() --- plume-models/src/medias.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/plume-models/src/medias.rs b/plume-models/src/medias.rs index e0fffb62..1882b8fe 100644 --- a/plume-models/src/medias.rs +++ b/plume-models/src/medias.rs @@ -65,6 +65,7 @@ impl MediaCategory { impl Media { insert!(medias, NewMedia); get!(medias); + find_by!(medias, find_by_file_path, file_path as &str); pub fn for_user(conn: &Connection, owner: i32) -> Result> { medias::table