* Fixed scene marker "scene_updated_at" sort option
* Added "created_at" and "updated_at" sort options.  Closes #19
This commit is contained in:
Stash Dev
2019-03-23 16:26:15 -07:00
parent 3e25f78854
commit 543d2597ec
3 changed files with 64 additions and 58 deletions

View File

@@ -198,7 +198,12 @@ func (qb *SceneMarkerQueryBuilder) Query(sceneMarkerFilter *SceneMarkerFilterTyp
func (qb *SceneMarkerQueryBuilder) getSceneMarkerSort(findFilter *FindFilterType) string {
sort := findFilter.GetSort("title")
direction := findFilter.GetDirection()
return getSort(sort, direction, "scene_markers")
tableName := "scene_markers"
if sort == "scenes_updated_at" {
sort = "updated_at"
tableName = "scene"
}
return getSort(sort, direction, tableName)
}
func (qb *SceneMarkerQueryBuilder) querySceneMarkers(query string, args []interface{}, tx *sqlx.Tx) ([]SceneMarker, error) {