Merge branch 'master' of https://home.git.sebastienandre.com/sandre/SkydiveLogs
This commit is contained in:
@@ -21,6 +21,15 @@ namespace skydiveLogs_api.Controllers
|
||||
_mapper = mapper;
|
||||
}
|
||||
|
||||
[HttpGet("Simple")]
|
||||
[EnableCors]
|
||||
public SimpleSummaryResp Simple()
|
||||
{
|
||||
var result = _statsService.GetSimpleSummary();
|
||||
|
||||
return _mapper.Map<SimpleSummaryResp>(result);
|
||||
}
|
||||
|
||||
[HttpGet("ByDz")]
|
||||
[EnableCors]
|
||||
public IEnumerable<StatisticResp> ByDz()
|
||||
|
||||
11
Back/skydiveLogs-api/DataContract/SimpleSummaryResp.cs
Normal file
11
Back/skydiveLogs-api/DataContract/SimpleSummaryResp.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace skydiveLogs_api.DataContract
|
||||
{
|
||||
public class SimpleSummaryResp
|
||||
{
|
||||
public int TotalJumps { get; set; }
|
||||
|
||||
public int TotalCutaways { get; set; }
|
||||
|
||||
public JumpResp LastJump { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,8 @@ namespace skydiveLogs_api.Mapper
|
||||
CreateMap<Model.Aircraft ,DataContract.AircraftResp>();
|
||||
CreateMap<Model.DropZone ,DataContract.DropZoneResp>();
|
||||
CreateMap<Model.Statistic ,DataContract.StatisticResp>();
|
||||
|
||||
CreateMap<Model.SimpleSummary, DataContract.SimpleSummaryResp>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user