Skip to content

Commit

Permalink
Remove unused method from Transaction controller
Browse files Browse the repository at this point in the history
  • Loading branch information
VMelnalksnis committed Jun 6, 2021
1 parent ea33c37 commit e1544a9
Showing 1 changed file with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,34 +129,6 @@ public async Task<ActionResult<int>> Create([FromBody, BindRequired] Transaction
return CreatedAtAction(nameof(Get), new { id }, id);
}

/// <summary>
/// Updates a transaction if one exists with the specified id, otherwise creates a new transaction.
/// </summary>
///
/// <param name="id">The id of the transaction to update.</param>
/// <param name="model">The transaction that will be updated/created.</param>
///
/// <returns><see cref="OkObjectResult"/> if an existing transaction was updated or <see cref="CreatedAtActionResult"/> if a new one was created.</returns>
/// <response code="200">An existing transaction was updated with the specified values.</response>
/// <response code="201">An new transaction was created.</response>
//[HttpPut("{id}")]
//[ProducesResponseType(Status200OK)]
//[ProducesResponseType(Status201Created)]
//public async Task<ActionResult<int>> Put(int id, [FromBody, BindRequired] TransactionCreationModel model)
//{
// var transaction = _mapper.Map<Transaction>(model);
// var existing = await _repository.FindByIdAsync(id);
// if (existing is null)
// {
// var newId = await _repository.AddAsync(transaction);
// return CreatedAtAction(nameof(Get), new { id = newId }, newId);
// }

// transaction.Id = id;
// await _repository.UpdateAsync(transaction);
// return Ok(id);
//}

/// <summary>
/// Deletes the specified transaction.
/// </summary>
Expand Down

0 comments on commit e1544a9

Please sign in to comment.