Fix on AutoMapper
This commit is contained in:
@@ -52,10 +52,10 @@ namespace skydiveLogs_api.Controllers
|
|||||||
// GET: api/TunnelFlight/20230101/20230701
|
// GET: api/TunnelFlight/20230101/20230701
|
||||||
[HttpGet("{beginDate}/{endDate}")]
|
[HttpGet("{beginDate}/{endDate}")]
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
public TunnelFlightResp Get(string beginDate, string endDate)
|
public IEnumerable<TunnelFlightResp> Get(string beginDate, string endDate)
|
||||||
{
|
{
|
||||||
var result = _tunnelFlightService.GetTunnelFlightByDates(beginDate, endDate);
|
var result = _tunnelFlightService.GetTunnelFlightByDates(beginDate, endDate);
|
||||||
return _mapper.Map<TunnelFlightResp>(result);
|
return _mapper.Map<IEnumerable<TunnelFlightResp>>(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: api/Tunnel
|
// POST: api/Tunnel
|
||||||
|
|||||||
Reference in New Issue
Block a user