diff --git a/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj b/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj index 1b6ef17c..788a98e9 100644 --- a/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj +++ b/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj @@ -3,11 +3,11 @@ net8.0 InProcess - 1.9.8 - 1.9.7 - 1.9.8 + 1.9.9 + 1.9.9 + 1.9.9 Linux - 1.9.8 + 1.9.9 kklldog kklldog diff --git a/src/AgileConfig.Server.Service/AppService.cs b/src/AgileConfig.Server.Service/AppService.cs index 1ba4a64d..13a64ad4 100644 --- a/src/AgileConfig.Server.Service/AppService.cs +++ b/src/AgileConfig.Server.Service/AppService.cs @@ -159,7 +159,7 @@ public Task> GetAllAppsAsync() } var apps = await _appRepository.QueryPageAsync(exp, current, pageSize, sortField, - ascOrDesc.StartsWith("asc") ? "ASC" : "DESC"); + ascOrDesc?.StartsWith("asc") ?? true ? "ASC" : "DESC"); var count = await _appRepository.CountAsync(exp); return (apps, count); @@ -230,7 +230,7 @@ public Task> GetAllAppsAsync() if (sortProperty.TryGetValue(sortField, out var propertyInfo)) { - appGroupList = ascOrDesc.StartsWith("asc") + appGroupList = ascOrDesc?.StartsWith("asc") ?? true ? appGroupList.OrderBy(x => propertyInfo.GetValue(x.App, null)).ToList() : appGroupList.OrderByDescending(x => propertyInfo.GetValue(x.App, null)).ToList(); }