Update API about the stats "ByGear"
This commit is contained in:
@@ -11,7 +11,7 @@ namespace skydiveLogs_api.Business.Interface
|
|||||||
|
|
||||||
IEnumerable<Statistic> GetStatsByJumpType();
|
IEnumerable<Statistic> GetStatsByJumpType();
|
||||||
|
|
||||||
IEnumerable<Statistic> GetStatsByRig();
|
IEnumerable<Statistic> GetStatsByGear();
|
||||||
|
|
||||||
IEnumerable<Statistic> GetStatsByYear();
|
IEnumerable<Statistic> GetStatsByYear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace skydiveLogs_api.Business
|
|||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Statistic> GetStatsByRig()
|
public IEnumerable<Statistic> GetStatsByGear()
|
||||||
{
|
{
|
||||||
var allJumps = _jumpRepository.GetAll();
|
var allJumps = _jumpRepository.GetAll();
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ namespace skydiveLogs_api.Controllers
|
|||||||
return _mapper.Map<IEnumerable<StatisticResp>>(result);
|
return _mapper.Map<IEnumerable<StatisticResp>>(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("ByRig")]
|
[HttpGet("ByGear")]
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
public IEnumerable<StatisticResp> ByRig()
|
public IEnumerable<StatisticResp> ByGear()
|
||||||
{
|
{
|
||||||
var result = _statsService.GetStatsByRig();
|
var result = _statsService.GetStatsByGear();
|
||||||
|
|
||||||
return _mapper.Map<IEnumerable<StatisticResp>>(result);
|
return _mapper.Map<IEnumerable<StatisticResp>>(result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user