Add comments
This commit is contained in:
@@ -22,7 +22,10 @@ namespace skydiveLogs_api.Controllers
|
|||||||
|
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
|
|
||||||
// GET: api/Tunnel
|
/// <summary>
|
||||||
|
/// Retrieves a list of all tunnels.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A collection of TunnelResp objects containing all tunnels.</returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
public IEnumerable<TunnelResp> Get()
|
public IEnumerable<TunnelResp> Get()
|
||||||
@@ -31,7 +34,11 @@ namespace skydiveLogs_api.Controllers
|
|||||||
return _mapper.Map<IEnumerable<TunnelResp>>(result);
|
return _mapper.Map<IEnumerable<TunnelResp>>(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/Tunnel/5
|
/// <summary>
|
||||||
|
/// Retrieves a tunnel by its ID.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">The tunnel ID to retrieve.</param>
|
||||||
|
/// <returns>A TunnelResp object containing the tunnel details.</returns>
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
public TunnelResp Get(int id)
|
public TunnelResp Get(int id)
|
||||||
|
|||||||
@@ -23,7 +23,10 @@ namespace skydiveLogs_api.Controllers
|
|||||||
|
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
|
|
||||||
// GET: api/TunnelFlight
|
/// <summary>
|
||||||
|
/// Retrieves a list of all tunnel flights.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A collection of TunnelFlightResp objects containing all tunnel flights.</returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
public IEnumerable<TunnelFlightResp> Get()
|
public IEnumerable<TunnelFlightResp> Get()
|
||||||
@@ -32,7 +35,11 @@ namespace skydiveLogs_api.Controllers
|
|||||||
return _mapper.Map<IEnumerable<TunnelFlightResp>>(result);
|
return _mapper.Map<IEnumerable<TunnelFlightResp>>(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/TunnelFlight/5
|
/// <summary>
|
||||||
|
/// Retrieves a tunnel flight by its ID.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">The tunnel flight ID to retrieve.</param>
|
||||||
|
/// <returns>A TunnelFlightResp object containing the tunnel flight details.</returns>
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
public TunnelFlightResp Get(int id)
|
public TunnelFlightResp Get(int id)
|
||||||
@@ -41,7 +48,12 @@ namespace skydiveLogs_api.Controllers
|
|||||||
return _mapper.Map<TunnelFlightResp>(result);
|
return _mapper.Map<TunnelFlightResp>(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/TunnelFlight/20230101/20230701
|
/// <summary>
|
||||||
|
/// Retrieves tunnel flights filtered by date range.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="beginDate">The start date for filtering.</param>
|
||||||
|
/// <param name="endDate">The end date for filtering.</param>
|
||||||
|
/// <returns>A collection of TunnelFlightResp objects filtered by the specified date range.</returns>
|
||||||
[HttpGet("{beginDate}/{endDate}")]
|
[HttpGet("{beginDate}/{endDate}")]
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
public IEnumerable<TunnelFlightResp> Get(string beginDate, string endDate)
|
public IEnumerable<TunnelFlightResp> Get(string beginDate, string endDate)
|
||||||
@@ -50,7 +62,12 @@ namespace skydiveLogs_api.Controllers
|
|||||||
return _mapper.Map<IEnumerable<TunnelFlightResp>>(result);
|
return _mapper.Map<IEnumerable<TunnelFlightResp>>(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/TunnelFlight/month/20230101/20230701
|
/// <summary>
|
||||||
|
/// Retrieves tunnel flights grouped by month within a date range.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="beginDate">The start date for grouping.</param>
|
||||||
|
/// <param name="endDate">The end date for grouping.</param>
|
||||||
|
/// <returns>A collection of StatisticForChartResp objects grouped by month.</returns>
|
||||||
[HttpGet("month/{beginDate}/{endDate}")]
|
[HttpGet("month/{beginDate}/{endDate}")]
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
public IEnumerable<StatisticForChartResp> GetGroupByMonth(string beginDate, string endDate)
|
public IEnumerable<StatisticForChartResp> GetGroupByMonth(string beginDate, string endDate)
|
||||||
@@ -59,7 +76,10 @@ namespace skydiveLogs_api.Controllers
|
|||||||
return _mapper.Map<IEnumerable<StatisticForChartResp>>(result);
|
return _mapper.Map<IEnumerable<StatisticForChartResp>>(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: api/Tunnel
|
/// <summary>
|
||||||
|
/// Adds a new tunnel flight to the system.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value">TunnelFlightReq object containing the new tunnel flight data.</param>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
public void Post([FromBody] TunnelFlightReq value)
|
public void Post([FromBody] TunnelFlightReq value)
|
||||||
@@ -69,7 +89,11 @@ namespace skydiveLogs_api.Controllers
|
|||||||
_mapper.Map<TunnelFlight>(value));
|
_mapper.Map<TunnelFlight>(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
// PUT: api/TunnelFlight/5
|
/// <summary>
|
||||||
|
/// Updates an existing tunnel flight.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">The tunnel flight ID to update.</param>
|
||||||
|
/// <param name="value">TunnelFlightReq object containing the updated tunnel flight data.</param>
|
||||||
[HttpPut("{id}")]
|
[HttpPut("{id}")]
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
public void Put(int id, [FromBody] TunnelFlightReq value)
|
public void Put(int id, [FromBody] TunnelFlightReq value)
|
||||||
@@ -77,7 +101,10 @@ namespace skydiveLogs_api.Controllers
|
|||||||
_tunnelFlightService.UpdateTunnelFlight(id, _mapper.Map<TunnelFlight>(value));
|
_tunnelFlightService.UpdateTunnelFlight(id, _mapper.Map<TunnelFlight>(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE: api/TunnelFlight/5
|
/// <summary>
|
||||||
|
/// Deletes a tunnel flight by its ID.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">The tunnel flight ID to delete.</param>
|
||||||
[HttpDelete("{id}")]
|
[HttpDelete("{id}")]
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
public void Delete(int id)
|
public void Delete(int id)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-card-title>
|
</mat-card-title>
|
||||||
<mat-card-subtitle style="font-size: 12px">
|
<mat-card-subtitle style="font-size: 12px; text-align: center;">
|
||||||
{{ "App_Footer" | translate }}{{ version }} - @Séb
|
{{ "App_Footer" | translate }}{{ version }} - @Séb
|
||||||
</mat-card-subtitle>
|
</mat-card-subtitle>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
|
|||||||
Reference in New Issue
Block a user