From 98b0867b1dbd32ff497530795c6ec66029b3f349 Mon Sep 17 00:00:00 2001 From: "agile.zhou" Date: Sun, 1 Dec 2024 22:23:04 +0800 Subject: [PATCH 1/2] Fixbug: can not search app when sort direction is null --- src/AgileConfig.Server.Service/AppService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } From 73bb0ac2f986b4a2c9564a372dab321c68313562 Mon Sep 17 00:00:00 2001 From: "agile.zhou" Date: Sun, 1 Dec 2024 22:25:24 +0800 Subject: [PATCH 2/2] Update package version to 1.9.9 --- .../AgileConfig.Server.Apisite.csproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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