public IActionResult DeleteTransaction([FromRoute(Name = "transactionId")][Required] string transactionId) { string clientId = Request.HttpContext.Items["ClientId"]?.ToString(); if (_transactionProcessor.DeleteTransaction(transactionId, clientId)) { return(Json("Transaction Deleted")); } return(BadRequest("Failed to delete Transaction")); }
public async Task <IActionResult> Delete([FromForm] TransactionForm TransactionForm, string BudgetId, string CategoryId) { var modifiedBudget = await _transactionProcessor.DeleteTransaction(TransactionForm, BudgetId, CategoryId); if (modifiedBudget == null) { return(NotFound()); } return(Ok(modifiedBudget)); }