fix: erro de userstats
All checks were successful
Deploy QR Rapido / test (push) Successful in 59s
Deploy QR Rapido / build-and-push (push) Successful in 9m51s
Deploy QR Rapido / deploy-staging (push) Has been skipped
Deploy QR Rapido / deploy-production (push) Successful in 1m20s

This commit is contained in:
Ricardo Carneiro 2025-09-22 22:15:26 -03:00
parent 822dd424c7
commit 000ac967e1

View File

@ -1187,6 +1187,12 @@ class QRRapidoGenerator {
}
async initializeUserCounter() {
// ✅ Check if user is logged in before making API request
const userStatus = document.getElementById('user-premium-status')?.value;
if (userStatus === 'anonymous') {
return; // Don't make request for anonymous users
}
try {
const response = await fetch('/api/QR/GetUserStats');
if (response.ok) {