forked from ddrilling/AsbCloudServer
Логика получения idCustomer заменена на готовый метод GetCustomerId()
This commit is contained in:
parent
583866d75d
commit
c77a4e69a3
@ -22,14 +22,9 @@ namespace AsbCloudWebApi.Controllers
|
||||
[ProducesResponseType(typeof(IEnumerable<WellDto>), (int)System.Net.HttpStatusCode.OK)]
|
||||
public IActionResult GetWells()
|
||||
{
|
||||
var claimIdCustomer = User.FindFirst("IdCustomer");
|
||||
var idCustomer = User.GetCustomerId();
|
||||
|
||||
if (claimIdCustomer is null)
|
||||
return NoContent();
|
||||
|
||||
var idCustomer = int.Parse(claimIdCustomer.Value);
|
||||
|
||||
var wells = wellService.GetWellsByCustomer(idCustomer);
|
||||
var wells = wellService.GetWellsByCustomer((int)idCustomer);
|
||||
|
||||
return Ok(wells);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user