Kaynağa Gözat

修正动态api响应数据格式化

zhontai 2 yıl önce
ebeveyn
işleme
d46085cd93

+ 3 - 2
src/platform/ZhonTai.DynamicApi/DynamicApiConvention.cs

@@ -155,8 +155,9 @@ public class DynamicApiConvention : IApplicationModelConvention
         {
             if (!CheckNoMapMethod(action))
             {
-                var returnType =  action.ActionMethod.GetReturnType();
-                if (returnType == typeof(void)) return;
+                var returnType = action.ActionMethod.GetReturnType();
+
+                if (returnType == typeof(void)) continue;
                 action.Filters.Add(new FormatResultAttribute(returnType));
             }
         }