mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-27 16:44:53 +01:00
20 lines
502 B
C#
20 lines
502 B
C#
|
#nullable enable
|
|||
|
using BTCPayServer.Abstractions.Contracts;
|
|||
|
using Microsoft.AspNetCore.Http;
|
|||
|
|
|||
|
namespace BTCPayServer.Services.Stores;
|
|||
|
|
|||
|
public class ScopeProvider : IScopeProvider
|
|||
|
{
|
|||
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
|||
|
|
|||
|
public ScopeProvider(IHttpContextAccessor httpContextAccessor)
|
|||
|
{
|
|||
|
_httpContextAccessor = httpContextAccessor;
|
|||
|
}
|
|||
|
public string? GetCurrentStoreId()
|
|||
|
{
|
|||
|
return _httpContextAccessor.HttpContext.GetStoreData()?.Id;
|
|||
|
}
|
|||
|
}
|