Test updates by AI

This commit is contained in:
2026-03-24 22:11:58 +01:00
parent 0ebdbca549
commit 8f0cb650c7
11 changed files with 708 additions and 44 deletions
@@ -24,7 +24,10 @@ namespace skydiveLogs_api.Controllers
#region Public Methods
// DELETE: api/Jump/5
/// <summary>
/// Deletes a jump by its ID.
/// </summary>
/// <param name="id">The jump ID to delete.</param>
[HttpDelete("{id}")]
[EnableCors]
public void Delete(int id)
@@ -32,7 +35,10 @@ namespace skydiveLogs_api.Controllers
_jumpService.DeleteJumpById(id);
}
// GET: api/Jump
/// <summary>
/// Retrieves a list of all jumps.
/// </summary>
/// <returns>A JumpListResp containing all jumps and their count.</returns>
[HttpGet]
[EnableCors]
public JumpListResp Get()
@@ -47,7 +53,12 @@ namespace skydiveLogs_api.Controllers
return result;
}
// GET: api/Jump/5/10
/// <summary>
/// Retrieves a page of jumps with pagination.
/// </summary>
/// <param name="beginJumpIndex">The starting index for pagination.</param>
/// <param name="endJumpIndex">The ending index for pagination.</param>
/// <returns>A JumpListResp containing the requested page and total count.</returns>
[HttpGet("{beginJumpIndex}/{endJumpIndex}")]
[EnableCors]
public JumpListResp Get(int beginJumpIndex, int endJumpIndex)
@@ -63,7 +74,11 @@ namespace skydiveLogs_api.Controllers
return result;
}
// GET: api/Jump/5
/// <summary>
/// Retrieves a jump by its ID.
/// </summary>
/// <param name="id">The jump ID to retrieve.</param>
/// <returns>A JumpResp containing the jump details.</returns>
[HttpGet("{id}")]
[EnableCors]
public JumpResp Get(int id)
@@ -72,7 +87,10 @@ namespace skydiveLogs_api.Controllers
return _mapper.Map<JumpResp>(result);
}
// POST: api/Jump
/// <summary>
/// Adds a new jump to the system.
/// </summary>
/// <param name="value">JumpReq object containing the new jump data.</param>
[HttpPost]
[EnableCors]
public void Post([FromBody] JumpReq value)
@@ -84,7 +102,11 @@ namespace skydiveLogs_api.Controllers
_mapper.Map<Jump>(value));
}
// PUT: api/Jump/5
/// <summary>
/// Updates an existing jump.
/// </summary>
/// <param name="id">The jump ID to update.</param>
/// <param name="value">JumpReq object containing the new jump data.</param>
[HttpPut("{id}")]
[EnableCors]
public void Put(int id, [FromBody] JumpReq value)
@@ -101,4 +123,4 @@ namespace skydiveLogs_api.Controllers
#endregion Private Fields
}
}
}