mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Use UserNotFound instead of NotFound
This commit is contained in:
@@ -203,7 +203,7 @@ namespace BTCPayServer.Controllers.GreenField
|
||||
var user = await _userManager.FindByIdAsync(userId);
|
||||
if (user == null)
|
||||
{
|
||||
return NotFound();
|
||||
return UserNotFound();
|
||||
}
|
||||
|
||||
// We can safely delete the user if it's not an admin user
|
||||
@@ -254,5 +254,10 @@ namespace BTCPayServer.Controllers.GreenField
|
||||
|
||||
return (await _userManager.GetUsersInRoleAsync(Roles.ServerAdmin)).Count == 1;
|
||||
}
|
||||
|
||||
private IActionResult UserNotFound()
|
||||
{
|
||||
return this.CreateAPIError(404, "user-not-found", "The user was not found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user