Возвращена проверка на null полученного idCustomer

This commit is contained in:
KharchenkoVV 2021-05-18 11:11:16 +05:00
parent c77a4e69a3
commit 840e03e0cb

View File

@ -24,6 +24,11 @@ namespace AsbCloudWebApi.Controllers
{
var idCustomer = User.GetCustomerId();
if (idCustomer is null)
{
return NoContent();
}
var wells = wellService.GetWellsByCustomer((int)idCustomer);
return Ok(wells);
@ -33,7 +38,7 @@ namespace AsbCloudWebApi.Controllers
[ProducesResponseType(typeof(IEnumerable<WellDto>), (int)System.Net.HttpStatusCode.OK)]
public IActionResult GetTransmittingWells()
{
int? idCustomer = User.GetCustomerId();
var idCustomer = User.GetCustomerId();
if(idCustomer is null)
{