mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-22 12:09:19 +08:00
fix issue #I3SKUV 可以正常在swagger中使用mini profiler
This commit is contained in:
@@ -23,6 +23,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Infrastructure.Helpers;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StackExchange.Profiling;
|
||||
|
||||
namespace OpenAuth.WebApi.Controllers
|
||||
{
|
||||
@@ -331,6 +332,7 @@ namespace OpenAuth.WebApi.Controllers
|
||||
|
||||
/// <summary>
|
||||
/// 登录接口
|
||||
/// <para>该接口可以在swagger中查看mini profiler效果</para>
|
||||
/// </summary>
|
||||
/// <param name="request">登录参数</param>
|
||||
/// <returns></returns>
|
||||
@@ -341,7 +343,10 @@ namespace OpenAuth.WebApi.Controllers
|
||||
var result = new LoginResult();
|
||||
try
|
||||
{
|
||||
result = _authUtil.Login(request.AppKey, request.Account, request.Password);
|
||||
using (MiniProfiler.Current.Step("Login"))
|
||||
{
|
||||
result = _authUtil.Login(request.AppKey, request.Account, request.Password);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
Reference in New Issue
Block a user