//Handles movie commands
        internal void MoviesCommandHandling(JsonElement command)
        {
            string id = command.GetProperty("id").GetString().Substring(command.GetProperty("id").GetString().IndexOf("/") + 1);    //Only gets the second part of the id

            switch (id)
            {
            case "get":         //Retrieve the list of movies
                Console.WriteLine("movies/get command received");
                Write(JsonCommands.Commands.GetMoviesResponse(films));
                break;

            case "order":         //Reduce the tickets left for a movie by a certain amount
                bool success = false;
                foreach (Film film in films)
                {
                    if (film.Title == command.GetProperty("data").GetProperty("title").GetString())           //Check movie availabiliyu
                    {
                        if (command.GetProperty("data").GetProperty("amount").GetInt32() <= film.TicketsLeft) //Check amount of tickets left
                        {
                            film.TicketsLeft -= command.GetProperty("data").GetProperty("amount").GetInt32(); //Remove tickets
                            Console.WriteLine(film.TicketsLeft);
                            Server.updateFilms(films);
                            success = true;
                        }
                        else
                        {
                            success = false;
                        }
                    }
                    else
                    {
                        success = false;
                    }
                }
                //Write(Commands.OrderResponse(success));
                Server.Broadcast(Commands.GetMoviesResponse(films));
                //Write(Commands.GetMoviesResponse(films));
                break;

            default:
                Console.WriteLine("invalid movie command");
                break;
            }
        }