<?php
declare(strict_types=1);
require __DIR__ . '/bootstrap.php';

require_method('GET');
$user = require_user();
$course = active_course();
json_response([
    'status' => certificate_status((int) $user['id'], (int) $course['id']),
]);
