Game list should now be sorted, a new endpoint with the game list in random order have been added.

This commit is contained in:
2021-12-03 23:28:23 +01:00
parent ecec5fae9b
commit 0a73134381
5 changed files with 50 additions and 6 deletions

View File

@@ -182,7 +182,9 @@ func resetGameIdSeq() {
func findAllGames() []GameData {
rows, err := dbPool.Query(context.Background(),
"SELECT id, game_name, added, deleted, last_changed, path, times_played, last_played, number_of_songs FROM game")
"SELECT id, game_name, added, deleted, last_changed, path, times_played, last_played, number_of_songs "+
"FROM game "+
"ORDER BY game_name")
if err != nil {
_, _ = fmt.Fprintf(os.Stderr, "QueryRow failed: %v\n", err)
}