<?php
require __DIR__.'/_bootstrap.php';

use Zoo\Database;
use Zoo\Admin\AdminApiAuth;
use Zoo\Admin\GameMathAdmin;

try {
    AdminApiAuth::requireKey();
    $admin=new GameMathAdmin(Database::connect());
    json_out(['ok'=>true,'math'=>$admin->status()]);
} catch(Throwable $e) {
    json_out(['ok'=>false,'error'=>$e->getMessage()],403);
}
