<?php
require_once __DIR__.'/../../config.php';
require_once __DIR__ . '/../../engine/Kernel.php';
require_once __DIR__.'/../../engine/Logger.php';
require_once __DIR__.'/../../engine/ROSCAEngine.php';
$ctx = Kernel::handle(['auth' => true]);
$u   = $ctx['user'];
$roscas = ROSCAEngine::getMyRoscas((int)$u['id']);
echo json_encode(['ok'=>true,'data'=>$roscas], JSON_UNESCAPED_UNICODE);
