コード例 #1
0
        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 }));
        }
コード例 #2
0
        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());
        }