Define Media::find_by_file_path()
This commit is contained in:
parent
f90d7ddee3
commit
462c5a1d42
@ -65,6 +65,7 @@ impl MediaCategory {
|
|||||||
impl Media {
|
impl Media {
|
||||||
insert!(medias, NewMedia);
|
insert!(medias, NewMedia);
|
||||||
get!(medias);
|
get!(medias);
|
||||||
|
find_by!(medias, find_by_file_path, file_path as &str);
|
||||||
|
|
||||||
pub fn for_user(conn: &Connection, owner: i32) -> Result<Vec<Media>> {
|
pub fn for_user(conn: &Connection, owner: i32) -> Result<Vec<Media>> {
|
||||||
medias::table
|
medias::table
|
||||||
|
Loading…
Reference in New Issue
Block a user