Exemplo n.º 1
0
        static object GetHome(NancyContext context, IDocumentSession documentSession)
        {
            if (context == null) throw new ArgumentNullException("context");

            var alert = context.GetAlert();

            if (context.IsSignedUp())
            {
                var currentMember = context.GetCurrentMember(documentSession);
                var gmRooms = documentSession.GetRoomsByOwner(currentMember.Id);
                var playerRooms = documentSession.GetRoomsByPlayer(currentMember.Id);
                return new DashboardResponse(gmRooms, playerRooms, alert);
            }

            return new MarketingPageResponse(alert);
        }