1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 00:22:50 -05:00

fix bitpay initalization

This commit is contained in:
Kyle Spearrin
2019-03-19 23:32:54 -04:00
parent e2be61da0a
commit 685928a4c7
3 changed files with 12 additions and 7 deletions

View File

@ -13,7 +13,8 @@ namespace Bit.Api.Controllers
private readonly BitPayClient _bitPayClient;
private readonly GlobalSettings _globalSettings;
public MiscController(BitPayClient bitPayClient,
public MiscController(
BitPayClient bitPayClient,
GlobalSettings globalSettings)
{
_bitPayClient = bitPayClient;

View File

@ -58,13 +58,14 @@ namespace Bit.Api
// Caching
services.AddMemoryCache();
// BitPay
services.AddSingleton<BitPayClient>();
if(!globalSettings.SelfHosted)
{
// Rate limiting
services.AddSingleton<IIpPolicyStore, MemoryCacheIpPolicyStore>();
services.AddSingleton<IRateLimitCounterStore, MemoryCacheRateLimitCounterStore>();
// BitPay
services.AddSingleton<BitPayClient>();
}
// Identity