所有都用SimApiUitl.Json,增加了Gate,auth增加了获取所有token

This commit is contained in:
2026-05-03 19:34:47 +08:00
parent 894d6930f7
commit e3fc7db01c
16 changed files with 236 additions and 34 deletions
+4 -2
View File
@@ -29,9 +29,10 @@ public class SimApiExceptionMiddleware(RequestDelegate next, ILogger<SimApiExcep
case 200:
case 301:
case 302:
break;
case 404:
throw new SimApiException(context.Response.StatusCode, "请求的接口不存在");
break;
// case 404:
// throw new SimApiException(context.Response.StatusCode, "请求的接口不存在");
default:
throw new SimApiException(context.Response.StatusCode);
}
@@ -79,6 +80,7 @@ public class SimApiExceptionMiddleware(RequestDelegate next, ILogger<SimApiExcep
context.Response.StatusCode = 200;
context.Response.ContentType = "application/json";
context.Response.ContentLength = null; // 清除可能已设置的 Content-Length
await context.Response.WriteAsync(response.ToString());
}
}