Skip to content

Commit

Permalink
fix: HasFormContentType
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 committed Apr 9, 2024
1 parent dac1b76 commit b8b8b27
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public async Task GetProfileDataAsync(ProfileDataRequestContext context)
var request = _httpContextAccessor.HttpContext?.Request;
if (request != null)
{
var scheme = request.Form["scheme"];
if (!string.IsNullOrEmpty(scheme))
if (request.HasFormContentType && request.Form.TryGetValue("scheme", out var scheme))
{
var authUser = await _authClient.UserService.GetThirdPartyUserByUserIdAsync(new GetThirdPartyUserByUserIdModel
{
Expand Down

0 comments on commit b8b8b27

Please sign in to comment.