<?php
require_once __DIR__.'/../../_bootstrap.php';
require_once ROOT_PATH.'/includes/match_functions.php';
$u=afApiOuSessaoUsuario($pdo);
afSincronizarRecompensas($pdo,(int)$u['id'],calcularNivel((int)$u['xp_total']));
jsonResponse(['ok'=>true,'progressao'=>afResumoProgressao($pdo,(int)$u['id']),'recompensas'=>afListarRecompensas($pdo,(int)$u['id']),'xp_recente'=>afHistoricoXp($pdo,(int)$u['id'],20)]);
