コード例 #1
0
        public async Task <IActionResult> ApproveOther(int id, [FromBody] RequestApproval approval)
        {
            var currentStatus = approval.CurrentStatus;

            approval.AdminUserName = User.Identity.Name;

            switch (currentStatus)
            {
            case NewUserRequestStatus.NewUser:
                return(new ObjectResult(await _newUserRequestRepo.ApproveNewUser(id, approval)));

            case NewUserRequestStatus.CreateAgency:
                return(new ObjectResult(await _newUserRequestRepo.ApproveCreatedNewAgency(id, approval)));
            }

            return(null);
        }
コード例 #2
0
 public IActionResult ApproveAgency(int id, [FromBody] RequestApproval approval)
 {
     approval.AdminUserName = User.Identity.Name;
     return(new ObjectResult(_newUserRequestRepo.ApproveAgency(id, approval)));
 }
コード例 #3
0
 public async Task <IActionResult> ApproveConsultant(int id, [FromBody] RequestApproval approval)
 {
     approval.AdminUserName = User.Identity.Name;
     return(new ObjectResult(await _newUserRequestRepo.ApproveConsultant(id, approval)));
 }