...
This commit is contained in:
@@ -22,6 +22,13 @@ namespace Hushian.Application.Services
|
||||
private readonly VerificationService _VerificationService;
|
||||
private readonly IMapper _mapper;
|
||||
|
||||
public CompanyService(IGenericRepository<Company> companyRepository, VerificationService verificationService, IMapper mapper)
|
||||
{
|
||||
_CompanyRepository = companyRepository;
|
||||
_VerificationService = verificationService;
|
||||
_mapper = mapper;
|
||||
}
|
||||
|
||||
public async Task<ResponseBase<int>> RegisterCompany(RegisterCompanyDto dto)
|
||||
{
|
||||
ResponseBase<int> Response = new();
|
||||
@@ -197,6 +204,8 @@ namespace Hushian.Application.Services
|
||||
}
|
||||
public async Task<bool> AnyCompany(int CompanyID)
|
||||
=>await _CompanyRepository.Get().AnyAsync(a=>a.ID==CompanyID);
|
||||
public async Task<bool> AllowBot(int CompanyID)
|
||||
=> await _CompanyRepository.Get().AnyAsync(a => a.ID == CompanyID && a.allowBot);
|
||||
private async Task<int> Verifi(string Mobile) => await _VerificationService.GenerateCodeByPhoneNumberConfirmed(Mobile);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user