Exemplo n.º 1
0
        public ActionResult <CreateRoomResultModel> CreateRoom(int roomId)
        {
            var room = RoomList.FindRoom(roomId);

            if (!(room is null))
            {
                return(new CreateRoomResultModel()
                {
                    ExistRoom = true
                });
            }

            RoomList.CreateRoom(roomId);

            HttpContext.Session.SetInt32(KeyRoomId, roomId);
            Response.Cookies.Append(KeyRoomId, roomId.ToString());

            return(new CreateRoomResultModel());
        }