public async Task <IActionResult> FindPrivateCreditData([Required] CollectionSpecification <string> specification) { List <string> personalIds = specification.ResolveIds(); if (!personalIds.Any()) { return(BadRequest(new { Message = "At least one persomal id required." })); } var result = await this.creditService.GetCreditPrivatesAsync(personalIds); return(Ok(result)); }
public async Task <IActionResult> FindCompaniesCreditData([Required] CollectionSpecification <string> specification) { List <string> companyIds = specification.ResolveIds(); if (!companyIds.Any()) { return(BadRequest(new { Message = "At least one company id required." })); } var result = await this.companyService.FindCompaniesCreditDataAsync(companyIds); return(Ok(result)); }
public async Task <IActionResult> Find([Required] CollectionSpecification <string> specification, [FromQuery] RequestType type = RequestType.Ligth) { List <string> companyIds = specification.ResolveIds(); if (!companyIds.Any()) { return(BadRequest(new { Message = "At least one company id required." })); } var result = await this.companyService.FindCompaniesAsync(companyIds, type); return(Ok(result)); }