order actor and tag api reply by name

This commit is contained in:
lukas-heiligenbrunner 2022-11-30 23:28:10 +01:00
parent 39ed5cd7d8
commit 752200d42e
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ func getActorsFromDB() {
* @apiSuccess {string} .Thumbnail Portrait Thumbnail
*/
api.AddHandler("getAllActors", api.ActorNode, api.PermUser, func(context api.Context) {
query := "SELECT actor_id, name, thumbnail FROM actors"
query := "SELECT actor_id, name, thumbnail FROM actors ORDER BY name ASC"
context.Json(readActorsFromResultset(database.Query(query)))
})

View File

@ -78,7 +78,7 @@ func getFromDB() {
* @apiSuccess {string} TagName name of the Tag
*/
api.AddHandler("getAllTags", api.TagNode, api.PermUser, func(context api.Context) {
query := "SELECT tag_id,tag_name from tags ORDER BY tag_name"
query := "SELECT tag_id,tag_name from tags ORDER BY tag_name ASC"
context.Json(readTagsFromResultset(database.Query(query)))
})
}