(function () {
    // List of API endpoints to debug
    const apiEndpoints = [
        'https://www.renesseaanzee.nl/wp-json/app/v2/events?key=83b6ea44-9765-46b9-b391-8fd55ba49015&inside=1',
        'https://www.renesseaanzee.nl/wp-json/app/v1/activities?key=83b6ea44-9765-46b9-b391-8fd55ba49015&inside=1'
    ];

    apiEndpoints.forEach((url) => {
        console.log(`Fetching data from: ${url}`);

        // Fetch the data
        fetch(url)
            .then((response) => {
                if (!response.ok) {
                    console.error(`HTTP error! Status: ${response.status} for ${url}`);
                    return null;
                }
                return response.json(); // Parse as JSON
            })
            .then((data) => {
                if (data) {
                    console.log(`Data from ${url}:`, data);
                } else {
                    console.warn(`No data returned from ${url}`);
                }
            })
            .catch((error) => {
                console.error(`Error fetching data from ${url}:`, error);
            });
    });
})();