예제 #1
0
        //To get roles
        public IHttpActionResult GetUsersPendingApprovals(string emailID)
        {
            try
            {
                PendingApprovalsData pendingApprovalsData = new PendingApprovalsData();
                var pendingApprovals = pendingApprovalsData.GetPendingApprovals(emailID);

                return(Ok(pendingApprovals));
            }
            catch (Exception ex)
            {
                return(BadRequest("Could not fetch users pending approvals"));
            }
        }
예제 #2
0
        //To get roles
        public IHttpActionResult GetPendingApprovals(int?ownerID)
        {
            try
            {
                PendingApprovalsData pendingApprovalsData = new PendingApprovalsData();
                var pendingApprovals = pendingApprovalsData.GetPendingApprovals(ownerID);

                return(Ok(pendingApprovals));
            }
            catch (Exception ex)
            {
                return(BadRequest("Could not fetch pending approvals"));
            }
        }