<?php
ob_start();
header('Content-Type: application/json');
require_once '../config.php';

$token = $_GET['token'] ?? '';
if ($token) {
    $db->query("UPDATE pc_login_requests SET status = 2 WHERE token = '$token' AND status = 0");
}

echo json_encode(['code' => 0]);
exit;