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,11 @@ namespace skydiveLogs_api.Controllers
|
||||
|
||||
#region Public Methods
|
||||
|
||||
// PUT: api/DropZone/AddToFavorite/5
|
||||
/// <summary>
|
||||
/// Adds a drop zone to the user's favorites.
|
||||
/// </summary>
|
||||
/// <param name="id">The drop zone ID to add to favorites.</param>
|
||||
/// <returns>True if successful, false otherwise.</returns>
|
||||
[HttpPut("AddToFavorite/{id}")]
|
||||
[EnableCors]
|
||||
public bool AddToFavorite(int id)
|
||||
@@ -31,7 +35,10 @@ namespace skydiveLogs_api.Controllers
|
||||
return _dropZoneService.AddToFavorite(id);
|
||||
}
|
||||
|
||||
// DELETE: api/ApiWithActions
|
||||
/// <summary>
|
||||
/// Deletes a drop zone by its ID.
|
||||
/// </summary>
|
||||
/// <param name="id">The drop zone ID to delete.</param>
|
||||
[HttpDelete("{id}")]
|
||||
[EnableCors]
|
||||
public void Delete(int id)
|
||||
@@ -39,7 +46,10 @@ namespace skydiveLogs_api.Controllers
|
||||
_dropZoneService.DeleteDzById(id);
|
||||
}
|
||||
|
||||
// GET: api/DropZone
|
||||
/// <summary>
|
||||
/// Retrieves a list of all drop zones.
|
||||
/// </summary>
|
||||
/// <returns>A collection of DropZoneResp objects containing all drop zones.</returns>
|
||||
[HttpGet]
|
||||
[EnableCors]
|
||||
public IEnumerable<DropZoneResp> Get()
|
||||
@@ -49,7 +59,11 @@ namespace skydiveLogs_api.Controllers
|
||||
return _mapper.Map<IEnumerable<DropZoneResp>>(result);
|
||||
}
|
||||
|
||||
// GET: api/DropZone/5
|
||||
/// <summary>
|
||||
/// Retrieves a drop zone by its ID.
|
||||
/// </summary>
|
||||
/// <param name="id">The drop zone ID to retrieve.</param>
|
||||
/// <returns>A DropZoneResp object containing the drop zone details.</returns>
|
||||
[HttpGet("{id}")]
|
||||
[EnableCors]
|
||||
public DropZoneResp Get(int id)
|
||||
@@ -59,6 +73,10 @@ namespace skydiveLogs_api.Controllers
|
||||
return _mapper.Map<DropZoneResp>(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a simplified list of all drop zones.
|
||||
/// </summary>
|
||||
/// <returns>A collection of DropZoneSimpleResp objects containing simplified drop zone data.</returns>
|
||||
[HttpGet("GetSimple")]
|
||||
[EnableCors]
|
||||
public IEnumerable<DropZoneSimpleResp> GetSimple()
|
||||
@@ -68,7 +86,10 @@ namespace skydiveLogs_api.Controllers
|
||||
return _mapper.Map<IEnumerable<DropZoneSimpleResp>>(result);
|
||||
}
|
||||
|
||||
// POST: api/DropZone
|
||||
/// <summary>
|
||||
/// Adds a new drop zone to the system.
|
||||
/// </summary>
|
||||
/// <param name="value">DropZoneReq object containing the new drop zone data.</param>
|
||||
[HttpPost]
|
||||
[EnableCors]
|
||||
public void Post([FromBody] DropZoneReq value)
|
||||
@@ -76,7 +97,12 @@ namespace skydiveLogs_api.Controllers
|
||||
_dropZoneService.AddNewDz(_mapper.Map<DropZone>(value));
|
||||
}
|
||||
|
||||
// PUT: api/DropZone/5
|
||||
/// <summary>
|
||||
/// Updates an existing drop zone.
|
||||
/// </summary>
|
||||
/// <param name="id">The drop zone ID to update.</param>
|
||||
/// <param name="value">DropZoneReq object containing the updated drop zone data.</param>
|
||||
/// <returns>True if successful, false otherwise.</returns>
|
||||
[HttpPut("{id}")]
|
||||
[EnableCors]
|
||||
public bool Put(int id, [FromBody] DropZoneReq value)
|
||||
@@ -84,7 +110,11 @@ namespace skydiveLogs_api.Controllers
|
||||
return _dropZoneService.UpdateDz(id, _mapper.Map<DropZone>(value));
|
||||
}
|
||||
|
||||
// PUT: api/DropZone/RemoveToFavorite/15
|
||||
/// <summary>
|
||||
/// Removes a drop zone from the user's favorites.
|
||||
/// </summary>
|
||||
/// <param name="id">The drop zone ID to remove from favorites.</param>
|
||||
/// <returns>True if successful, false otherwise.</returns>
|
||||
[HttpPut("RemoveToFavorite/{id}")]
|
||||
[EnableCors]
|
||||
public bool RemoveToFavorite(int id)
|
||||
@@ -101,4 +131,4 @@ namespace skydiveLogs_api.Controllers
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user