예제 #1
0
        public ActionResult <IEnumerable <GroupInfoDto> > SyncPlayGetGroups()
        {
            var currentSession  = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request);
            var syncPlayRequest = new ListGroupsRequest();

            return(Ok(_syncPlayManager.ListGroups(currentSession, syncPlayRequest)));
        }
예제 #2
0
        /// <summary>
        /// Handles the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <value>The requested list of groups.</value>
        public List <GroupInfoView> Post(SyncPlayList request)
        {
            var currentSession = GetSession(_sessionContext);
            var filterItemId   = Guid.Empty;

            if (!string.IsNullOrEmpty(request.FilterItemId) && !Guid.TryParse(request.FilterItemId, out filterItemId))
            {
                Logger.LogWarning("ListGroups: {0} is not a valid format for FilterItemId. Ignoring filter.", request.FilterItemId);
            }

            return(_syncPlayManager.ListGroups(currentSession, filterItemId));
        }
예제 #3
0
        public ActionResult <IEnumerable <GroupInfoView> > SyncPlayGetGroups([FromQuery] Guid?filterItemId)
        {
            var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request);

            return(Ok(_syncPlayManager.ListGroups(currentSession, filterItemId.HasValue ? filterItemId.Value : Guid.Empty)));
        }