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

This commit is contained in:
zhengkunwang 2023-12-04 15:42:10 +08:00 committed by GitHub
parent fd4c3f2f2e
commit cceed9c2ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}