From 93f8439e280397cdcf88497cffea5ec7f84151d9 Mon Sep 17 00:00:00 2001 From: zyxkad Date: Tue, 27 Jun 2023 20:46:01 -0600 Subject: [PATCH] fixed release sort --- api/mysqlimpl/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/mysqlimpl/api.go b/api/mysqlimpl/api.go index b39f66a..de34d25 100644 --- a/api/mysqlimpl/api.go +++ b/api/mysqlimpl/api.go @@ -443,7 +443,7 @@ func (api *MySqlAPI)GetPluginReleases(id string)(releases []*PluginRelease, err const queryCmd = "SELECT `tag`,`enabled`,`stable`,`size`," + "CONVERT_TZ(`uploaded`,@@session.time_zone,'+00:00') AS `utc_uploaded`," + "`filename`,`downloads`,`github_url`" + - " FROM plugin_releases WHERE `id`=? ORDER BY `uploaded` DESC" + " FROM plugin_releases WHERE `id`=?" ctx, cancel := context.WithTimeout(context.Background(), time.Second * 5) defer cancel() @@ -472,7 +472,7 @@ func (api *MySqlAPI)GetPluginReleases(id string)(releases []*PluginRelease, err if err = rows.Err(); err != nil { return } - sort.Slice(releases, func(i, j int)(bool){ return releases[i].Tag.Less(releases[j].Tag) }) + sort.Slice(releases, func(i, j int)(bool){ return !releases[i].Tag.Less(releases[j].Tag) }) return }