feat(access): libera 90s de internet para pagamento + reconcile e deteccao de pagamento pela transacao
build-image / build-push (push) Successful in 5m6s

This commit is contained in:
jfeng committed 2026-10-22 07:56:19 -03:00
1 parent 9748c8e9e0
commit 49f4bb92bd
6 files changed
+131 -6

No files matched your search

+18
View File
@@ -783,7 +783,25 @@
window.location.href = hsUrl($('vUser').textContent, $('vPass').textContent);
});
// ===== Internet temporaria para pagar (abre o app do banco) =====
async function startFreeAccess() {
if (!mac) return;
try {
const res = await fetch('/api/access/start', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ mac }),
});
const d = await res.json();
if (d.ok) {
const mins = Math.round((d.seconds / 60) * 10) / 10;
toast('Internet liberada por ' + mins + ' min para pagar');
}
} catch { /* segue */ }
}
loadPlans();
startFreeAccess();
</script>
</body>
</html>