1
0
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:
sven-bitwarden
2026-01-13 15:59:01 -06:00
committed by Sven
parent 529f578c5b
commit 9b8cf29734
3 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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 };
}