<?php
require_once 'config/config.php';
echo "UDN test starting...\n";

// Get UDN platform info  
try {
    $database = new Database();
    $db = $database->getConnection();
    $stmt = $db->prepare("SELECT * FROM external_platforms WHERE name LIKE '%UDN%'");
    $stmt->execute();
    $udnPlatform = $stmt->fetch();

    if ($udnPlatform) {
        echo "Found UDN platform: " . $udnPlatform['name'] . "\n";
        echo "Platform ID: " . $udnPlatform['id'] . "\n";
        echo "API Endpoint: " . $udnPlatform['api_endpoint'] . "\n";
    } else {
        echo "UDN platform not found\n";
    }
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}
?>
