<?php
/**
 * 客户站 API - 检查更新
 * 访问地址: /api/check_update.php
 */
require_once __DIR__ . '/../config.php';
require_once __DIR__ . '/../includes/LicenseClient.php';

header('Content-Type: application/json');

try {
    $client = new LicenseClient();
    $result = $client->checkUpdate();
    echo json_encode($result);
} catch (Exception $e) {
    echo json_encode([
        'has_update' => false,
        'message' => $e->getMessage()
    ]);
}
exit;