mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-23 03:51:00 +00:00
Define Media::find_by_file_path()
This commit is contained in:
parent
f90d7ddee3
commit
462c5a1d42
1 changed files with 1 additions and 0 deletions
|
@ -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 a new issue