<?php
require_once __DIR__ . '/../config/db.php';
require_once __DIR__ . '/../auth/protect_admin.php';

$uids = $_POST['uids'] ?? [];

if (is_array($uids) && count($uids) > 0) {
    $in = implode(",", array_fill(0, count($uids), "?"));
    $stmt = $pdo->prepare("DELETE FROM uid_pool WHERE uid IN ($in)");
    $stmt->execute($uids);
    echo json_encode(['status' => 'ok']);
} else {
    echo json_encode(['status' => 'empty']);
}
exit;
