From 854a923fea61ed4f04aaef4a900d2395945b3958 Mon Sep 17 00:00:00 2001 From: Deluan Date: Sat, 2 May 2020 12:37:32 -0400 Subject: [PATCH] Don't sort ReadAll translations, as it will be sorted in the UI --- server/app/translations.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/app/translations.go b/server/app/translations.go index 1c01da7ed..46344eddd 100644 --- a/server/app/translations.go +++ b/server/app/translations.go @@ -5,7 +5,6 @@ import ( "context" "encoding/json" "path/filepath" - "sort" "strings" "sync" @@ -48,16 +47,13 @@ func (r *translationRepository) Count(options ...rest.QueryOptions) (int64, erro return int64(len(translations)), nil } -// Simple ReadAll implementation, only returns IDs. Does not support any `options`, always sort by name asc +// Simple ReadAll implementation, only returns IDs. Does not support any `options` func (r *translationRepository) ReadAll(options ...rest.QueryOptions) (interface{}, error) { var result []translation for _, t := range translations { t.Data = "" result = append(result, t) } - sort.Slice(result, func(i, j int) bool { - return result[i].Name < result[j].Name - }) return result, nil }