From 752200d42eac9ca83733eedd5c75c93f240bf429 Mon Sep 17 00:00:00 2001 From: lukas-heiligenbrunner Date: Wed, 30 Nov 2022 23:28:10 +0100 Subject: [PATCH] order actor and tag api reply by name --- apiGo/api/Actors.go | 2 +- apiGo/api/Tags.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apiGo/api/Actors.go b/apiGo/api/Actors.go index 20bbc8b..bbbb663 100644 --- a/apiGo/api/Actors.go +++ b/apiGo/api/Actors.go @@ -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))) }) diff --git a/apiGo/api/Tags.go b/apiGo/api/Tags.go index 552b515..bfae039 100644 --- a/apiGo/api/Tags.go +++ b/apiGo/api/Tags.go @@ -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))) }) }