mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
miniprofiler忽略swagger路径
This commit is contained in:
parent
c559f33037
commit
c0d47e37bf
@ -332,21 +332,17 @@ namespace OpenAuth.WebApi.Controllers
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 登录接口
|
/// 登录接口
|
||||||
/// <para>该接口可以在swagger中查看mini profiler效果</para>
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request">登录参数</param>
|
/// <param name="request">登录参数</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public LoginResult Login([FromBody]PassportLoginRequest request)
|
public LoginResult Login(PassportLoginRequest request)
|
||||||
{
|
{
|
||||||
var result = new LoginResult();
|
var result = new LoginResult();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (MiniProfiler.Current.Step("Login"))
|
result = _authUtil.Login(request.AppKey, request.Account, request.Password);
|
||||||
{
|
|
||||||
result = _authUtil.Login(request.AppKey, request.Account, request.Password);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -73,6 +73,7 @@ namespace OpenAuth.WebApi
|
|||||||
options.PopupShowTimeWithChildren = true;
|
options.PopupShowTimeWithChildren = true;
|
||||||
options.PopupShowTrivial = true;
|
options.PopupShowTrivial = true;
|
||||||
options.SqlFormatter = new StackExchange.Profiling.SqlFormatters.InlineFormatter();
|
options.SqlFormatter = new StackExchange.Profiling.SqlFormatters.InlineFormatter();
|
||||||
|
// options.IgnoredPaths.Add("/swagger/");
|
||||||
}).AddEntityFramework();//显示SQL语句及耗时
|
}).AddEntityFramework();//显示SQL语句及耗时
|
||||||
|
|
||||||
//添加swagger
|
//添加swagger
|
||||||
|
Loading…
Reference in New Issue
Block a user