diff --git a/电子展板/WebModule.cs b/电子展板/WebModule.cs index 56b98ab..84ef254 100644 --- a/电子展板/WebModule.cs +++ b/电子展板/WebModule.cs @@ -1,6 +1,5 @@ -using Nancy; -using Nancy.Extensions; -using Nancy.ModelBinding; +using Nancy; +using Nancy.ModelBinding; using System; using System.Collections.Generic; using System.IO; @@ -57,7 +56,7 @@ namespace 电子展板 //AsJson会将首字母小写 return Response.AsText(JsonHelper.ToJson(GlobalVariable.Config), "application/json", Encoding.UTF8); } - + /// @@ -97,7 +96,7 @@ namespace 电子展板 filePathList.Add($"/Upload/{fileName}"); } var result = new { state = 1, message = "上传成功", data = filePathList.GetStrArray() }; - return Response.AsJson(result); + return Response.AsJson(result); } @@ -137,4 +136,19 @@ namespace 电子展板 } + + //public class ApplicationBootstrapper : DefaultNancyBootstrapper + //{ + // protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) + // { + // SwaggerMetadataProvider.SetInfo("API", "v1.0", "电子展板", new Swagger.ObjectModel.Contact + // { + // EmailAddress = "18862253202@qq.com", + // Name = "大师兄法号随缘", + // Url = "https://www.cnblogs.com/zjwno1" + // }); + + // base.ApplicationStartup(container, pipelines); + // } + //} } diff --git a/电子展板/电子展板.csproj b/电子展板/电子展板.csproj index 7cfc60f..3cc7303 100644 --- a/电子展板/电子展板.csproj +++ b/电子展板/电子展板.csproj @@ -21,6 +21,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive --> +