Define Media::find_by_file_path()

This commit is contained in:
Kitaiti Makoto 2021-02-24 01:04:31 +09:00
parent f90d7ddee3
commit 462c5a1d42

View file

@ -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<Vec<Media>> {
medias::table