Fix lightning implementation, docs and tests

This commit is contained in:
nicolas.dorier
2020-06-08 23:40:58 +09:00
parent a9dbbe1955
commit 8dd6ecc0b8
36 changed files with 615 additions and 528 deletions

View File

@@ -42,7 +42,7 @@ namespace BTCPayServer.Controllers.GreenField
public async Task<ActionResult<ApiKeyData>> CreateKey(CreateApiKeyRequest request)
{
if (request is null)
return BadRequest();
return NotFound();
var key = new APIKeyData()
{
Id = Encoders.Hex.EncodeData(RandomUtils.GetBytes(20)),
@@ -74,7 +74,7 @@ namespace BTCPayServer.Controllers.GreenField
public async Task<IActionResult> RevokeKey(string apikey)
{
if (string.IsNullOrEmpty(apikey))
return BadRequest();
return NotFound();
if (await _apiKeyRepository.Remove(apikey, _userManager.GetUserId(User)))
return Ok();
else