mirror of
https://github.com/bitwarden/server
synced 2026-01-28 23:36:12 +00:00
Adjusts method name to better match repository method
This commit is contained in:
@@ -81,7 +81,7 @@ public class PoliciesController : Controller
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
var policy = await _policyQuery.GetByOrganizationIdAndType(orgId, (PolicyType)type);
|
||||
var policy = await _policyQuery.GetByOrganizationIdTypeAsync(orgId, (PolicyType)type);
|
||||
if (policy.Type is PolicyType.SingleOrg)
|
||||
{
|
||||
return await policy.GetSingleOrgPolicyDetailResponseAsync(_organizationHasVerifiedDomainsQuery);
|
||||
|
||||
@@ -5,5 +5,5 @@ namespace Bit.Core.AdminConsole.OrganizationFeatures.Policies.Implementations;
|
||||
|
||||
public interface IPolicyQuery
|
||||
{
|
||||
Task<Policy> GetByOrganizationIdAndType(Guid organizationId, PolicyType policyType);
|
||||
Task<Policy> GetByOrganizationIdTypeAsync(Guid organizationId, PolicyType policyType);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Bit.Core.AdminConsole.OrganizationFeatures.Policies.Implementations;
|
||||
|
||||
public class PolicyQuery(IPolicyRepository policyRepository) : IPolicyQuery
|
||||
{
|
||||
public async Task<Policy> GetByOrganizationIdAndType(Guid organizationId, PolicyType policyType)
|
||||
public async Task<Policy> GetByOrganizationIdTypeAsync(Guid organizationId, PolicyType policyType)
|
||||
=> await policyRepository.GetByOrganizationIdTypeAsync(organizationId, policyType)
|
||||
?? new Policy { OrganizationId = organizationId, Type = policyType };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user