qinchaoyue 1 月之前
父节点
当前提交
8452102b4c
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/Hotline.Api/Controllers/FilterController/ExportDataController.cs

+ 1 - 2
src/Hotline.Api/Controllers/FilterController/ExportDataController.cs

@@ -55,10 +55,9 @@ public class ExportDataController : BaseController
             .ToList()
             ?? throw UserFriendlyException.SameMessage($"根据URL查询路由失败: {originalPath}");
         var matchingEndpoint = matchingEndpoints.FirstOrDefault();
-        if (matchingEndpoint == null) throw UserFriendlyException.SameMessage($"根据URL查询路由失败: {originalPath}");
         if (matchingEndpoints.Count > 1)
         {
-            matchingEndpoint = matchingEndpoints.First(m => m.DisplayName.Contains("Get"));
+            matchingEndpoint = matchingEndpoints.FirstOrDefault(m => m.DisplayName.Contains("Get"));
         }
         if (matchingEndpoint == null)
             throw UserFriendlyException.SameMessage($"根据URL查询路由失败: {originalPath}");