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); }
public IActionResult ApproveAgency(int id, [FromBody] RequestApproval approval) { approval.AdminUserName = User.Identity.Name; return(new ObjectResult(_newUserRequestRepo.ApproveAgency(id, approval))); }
public async Task <IActionResult> ApproveConsultant(int id, [FromBody] RequestApproval approval) { approval.AdminUserName = User.Identity.Name; return(new ObjectResult(await _newUserRequestRepo.ApproveConsultant(id, approval))); }