<?php
require_once __DIR__ . "/_bootstrap.php";

try {
    $pdo = fxh_optimizer_pdo();
    $lic = fxh_optimizer_require_license($pdo);

    fxh_send(200, [
        "status" => "ok",
        "license" => $lic["license_key"]
    ]);
} catch (Throwable $e) {
    fxh_send(500, ["error"=>"Server error", "details"=>$e->getMessage()]);
}
