// config.js // Constantes const API_BASE_URL = "https://dancadigital.com/ingressos";//"http://localhost:8000/ingressos"; const LOGIN_PAGE_URL = "/"; const SESSOES_PAGE_URL = "/sessoes.html"; const EVENTOS_PAGE_URL = "/eventos.html"; const QR_READER_PAGE_URL = "/qr-reader.html"; // Função para obter o valor de um cookie function getCookie(name) { const value = `; ${document.cookie}`; const parts = value.split(`; ${name}=`); if (parts.length === 2) return JSON.parse(parts.pop().split(';').shift()); } // Função para extrair parâmetros da URL function getUrlParameter(name) { const urlParams = new URLSearchParams(window.location.search); return urlParams.get(name); } function logout() { document.cookie = "userSession=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; window.location.href = LOGIN_PAGE_URL; }