mirror of
https://github.com/bitwarden/server.git
synced 2025-04-08 14:38:15 -05:00
change to username
This commit is contained in:
parent
7f9d979346
commit
82ba3e4c30
@ -39,10 +39,10 @@ namespace Bit.Api.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("breach")]
|
[HttpGet("breach")]
|
||||||
public async Task<IActionResult> Get(string email)
|
public async Task<IActionResult> Get(string username)
|
||||||
{
|
{
|
||||||
var encodedEmail = WebUtility.UrlEncode(email);
|
var encodedUsername = WebUtility.UrlEncode(username);
|
||||||
var request = new HttpRequestMessage(HttpMethod.Get, string.Format(HibpBreachApi, encodedEmail));
|
var request = new HttpRequestMessage(HttpMethod.Get, string.Format(HibpBreachApi, encodedUsername));
|
||||||
if(!string.IsNullOrWhiteSpace(_globalSettings.HibpBreachApiKey))
|
if(!string.IsNullOrWhiteSpace(_globalSettings.HibpBreachApiKey))
|
||||||
{
|
{
|
||||||
request.Headers.Add("Authorization", $"Basic {_globalSettings.HibpBreachApiKey}");
|
request.Headers.Add("Authorization", $"Basic {_globalSettings.HibpBreachApiKey}");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user