diff --git a/IRaCIS.Core.API/Startup.cs b/IRaCIS.Core.API/Startup.cs index 3db4baf..1fd1dc5 100644 --- a/IRaCIS.Core.API/Startup.cs +++ b/IRaCIS.Core.API/Startup.cs @@ -204,7 +204,7 @@ namespace IRaCIS.Core.API // 特殊异常处理 比如 404 app.UseStatusCodePagesWithReExecute("/Error/{0}"); - SwaggerSetup.Configure(app, env); + //SwaggerSetup.Configure(app, env); diff --git a/IRaCIS.Core.API/_ServiceExtensions/Swagger/SwaggerSetup.cs b/IRaCIS.Core.API/_ServiceExtensions/Swagger/SwaggerSetup.cs index 68905d6..38a716f 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/Swagger/SwaggerSetup.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/Swagger/SwaggerSetup.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; using Microsoft.OpenApi.Models; +using NPOI.SS.Formula.Functions; using Swashbuckle.AspNetCore.Filters; using Swashbuckle.AspNetCore.SwaggerGen; using Swashbuckle.AspNetCore.SwaggerUI; diff --git a/IRaCIS.Core.Application/Middleware/AuthenticationMiddleware.cs b/IRaCIS.Core.Application/Middleware/AuthenticationMiddleware.cs index 0fdf5cb..525588f 100644 --- a/IRaCIS.Core.Application/Middleware/AuthenticationMiddleware.cs +++ b/IRaCIS.Core.Application/Middleware/AuthenticationMiddleware.cs @@ -33,7 +33,7 @@ namespace IRaCIS.Core.API.Middleware { context.Response.StatusCode = StatusCodes.Status409Conflict; ; context.Response.ContentType = "application/json"; - var msg = JsonConvert.SerializeObject(ResponseOutput.NotOk("You do not have permission")); + var msg = JsonConvert.SerializeObject(ResponseOutput.NotOk("Access was denied due to lack of permission")); Console.WriteLine(msg); await context.Response.WriteAsync(msg); await context.Response.Body.FlushAsync();