Skip to content

Commit

Permalink
Fix get song by id
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Jul 24, 2021
1 parent 7bd506a commit 5b81f7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion persistence/mediafile_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func NewMediaFileRepository(ctx context.Context, o orm.Ormer) *mediaFileReposito
"random": "RANDOM()",
}
r.filterMappings = map[string]filterFunc{
"id": idFilter(r.tableName),
"title": fullTextFilter,
"starred": booleanFilter,
}
Expand All @@ -44,7 +45,7 @@ func (r *mediaFileRepository) CountAll(options ...model.QueryOptions) (int64, er
}

func (r *mediaFileRepository) Exists(id string) (bool, error) {
return r.exists(Select().Where(Eq{"id": id}))
return r.exists(Select().Where(Eq{"media_file.id": id}))
}

func (r *mediaFileRepository) Put(m *model.MediaFile) error {
Expand Down

0 comments on commit 5b81f7a

Please sign in to comment.