Skip to content

Commit

Permalink
Added summary descriptions for methods
Browse files Browse the repository at this point in the history
  • Loading branch information
annygumeniuk committed Dec 20, 2024
1 parent 5f29aea commit ac10b8b
Showing 1 changed file with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ public PositionController(IPositionService positionService, ICurrentUserService
public IActionResult CurrentProviderId() => Ok(GetProviderId());

/// <summary>
/// Create a new position for the current provider.
/// Creates a new position for the current provider.
/// </summary>
/// <param name="createDto">The position data to create.</param>
/// <returns>The created position.</returns>
[HttpPost]
public async Task<ActionResult<PositionDto>> Create([FromBody] PositionCreateDto createDto)
{
Expand All @@ -42,8 +44,9 @@ public async Task<ActionResult<PositionDto>> Create([FromBody] PositionCreateDto
}

/// <summary>
/// Get all positions for current provider.
/// Retrieves all positions for the current provider.
/// </summary>
/// <returns>List of positions.</returns>
[HttpGet]
public async Task<ActionResult<IEnumerable<PositionDto>>> GetAll()
{
Expand All @@ -61,8 +64,10 @@ public async Task<ActionResult<IEnumerable<PositionDto>>> GetAll()
}

/// <summary>
/// Get a specific position by ID.
/// Retrieves a specific position by its ID.
/// </summary>
/// <param name="id">The ID of the position.</param>
/// <returns>The position details.</returns>
[HttpGet("{id}")]
public async Task<ActionResult<PositionDto>> GetById(Guid id)
{
Expand All @@ -78,8 +83,11 @@ public async Task<ActionResult<PositionDto>> GetById(Guid id)
}

/// <summary>
/// Update an existing position.
/// Updates an existing position.
/// </summary>
/// <param name="id">The ID of the position to update.</param>
/// <param name="updateDto">The updated position data.</param>
/// <returns>The updated position.</returns>
[HttpPut("{id}")]
public async Task<ActionResult<PositionDto>> Update(Guid id, [FromBody] PositionUpdateDto updateDto)
{
Expand All @@ -96,8 +104,10 @@ public async Task<ActionResult<PositionDto>> Update(Guid id, [FromBody] Position
}

/// <summary>
/// Delete a position.
/// Deletes a specific position.
/// </summary>
/// <param name="id">The ID of the position to delete.</param>
/// <returns>No content if successful.</returns>
[HttpDelete("{id}")]
public async Task<IActionResult> Delete(Guid id)
{
Expand Down

0 comments on commit ac10b8b

Please sign in to comment.