Little test with AI + Add the equipment (#8)
Tests using local LLM AI to add comments in the C# files For the flights tunnel, show the total to day/hours For the jump, add the equipment (now just with the wingsuit) Reviewed-on: #8 Co-authored-by: sandre <perso@sebastienandre.com> Co-committed-by: sandre <perso@sebastienandre.com>
This commit was merged in pull request #8.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
using AutoMapper;
|
||||
using System.Collections.Generic;
|
||||
using AutoMapper;
|
||||
using Microsoft.AspNetCore.Cors;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using skydiveLogs_api.DataContract;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainBusiness.Interfaces;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
{
|
||||
@@ -23,7 +23,10 @@ namespace skydiveLogs_api.Controllers
|
||||
|
||||
#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]
|
||||
[EnableCors]
|
||||
public IEnumerable<TunnelFlightResp> Get()
|
||||
@@ -32,7 +35,11 @@ namespace skydiveLogs_api.Controllers
|
||||
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}")]
|
||||
[EnableCors]
|
||||
public TunnelFlightResp Get(int id)
|
||||
@@ -41,7 +48,12 @@ namespace skydiveLogs_api.Controllers
|
||||
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}")]
|
||||
[EnableCors]
|
||||
public IEnumerable<TunnelFlightResp> Get(string beginDate, string endDate)
|
||||
@@ -50,7 +62,12 @@ namespace skydiveLogs_api.Controllers
|
||||
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}")]
|
||||
[EnableCors]
|
||||
public IEnumerable<StatisticForChartResp> GetGroupByMonth(string beginDate, string endDate)
|
||||
@@ -59,7 +76,10 @@ namespace skydiveLogs_api.Controllers
|
||||
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]
|
||||
[EnableCors]
|
||||
public void Post([FromBody] TunnelFlightReq value)
|
||||
@@ -69,7 +89,11 @@ namespace skydiveLogs_api.Controllers
|
||||
_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}")]
|
||||
[EnableCors]
|
||||
public void Put(int id, [FromBody] TunnelFlightReq value)
|
||||
@@ -77,7 +101,10 @@ namespace skydiveLogs_api.Controllers
|
||||
_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}")]
|
||||
[EnableCors]
|
||||
public void Delete(int id)
|
||||
@@ -94,4 +121,4 @@ namespace skydiveLogs_api.Controllers
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user