feat: 应用升级版本列表增加排序 (#3162)

This commit is contained in:
zhengkunwang
2023-12-04 07:42:10 +00:00
committed by GitHub
parent fd4c3f2f2e
commit cceed9c2ea
+4
View File
@@ -8,6 +8,7 @@ import (
"os"
"path"
"reflect"
"sort"
"strconv"
"strings"
@@ -505,6 +506,9 @@ func (a *AppInstallService) GetUpdateVersions(installId uint) ([]dto.AppVersion,
})
}
}
sort.Slice(versions, func(i, j int) bool {
return common.CompareVersion(versions[i].Version, versions[j].Version)
})
return versions, nil
}