Remove unnecessary null check

This commit is contained in:
Umar Bolatov
2021-04-10 21:15:18 -07:00
parent 9f8f677125
commit 0b4d94faf2

View File

@@ -200,7 +200,7 @@ namespace BTCPayServer.Controllers.GreenField
[Authorize(Policy = Policies.CanModifyServerSettings, AuthenticationSchemes = AuthenticationSchemes.Greenfield)]
public async Task<ActionResult<ApplicationUserData>> DeleteUser(string userId)
{
var user = userId == null ? null : await _userManager.FindByIdAsync(userId);
var user = await _userManager.FindByIdAsync(userId);
if (user == null)
{
return NotFound();