public async Task <IActionResult> ApproverDelete(int confirmedId, string userId) { await _confirmedUserService.DeleteAsync(confirmedId); _loggerService.LogInformation("Approve succesfuly deleted"); return(RedirectToAction("Approvers", "Account", new { userId = userId })); }
public async Task <IActionResult> ApproverDelete(int confirmedId) { if (confirmedId != 0) { await _confirmedUserService.DeleteAsync(await _userManager.GetUserAsync(User), confirmedId); _loggerService.LogInformation("Approve succesfuly deleted"); return(Ok()); } _loggerService.LogError("Confirmed id is 0"); return(NotFound()); }