Spaces:
Sleeping
Sleeping
Nathan commited on
Commit ·
f57a4d1
1
Parent(s): 7c32afc
Test: Added God Mode bypass to allow multi-channel testing
Browse filesFiles changed (2)
150 unmodified lines151152153154155156426 unmodified lines583584585586587588150 unmodified lines<div class="logo-group"><div class="logo-text">ViralFlow AI</div><div class="tag" id="user-plan" style="background: rgba(99, 102, 241, 0.1); color: var(--accent-light);">🛡️ FREE CREATOR</div><a href="plans.html" id="nav-plans" style="margin-left: 15px; font-size: 0.8rem; font-weight: 700; color: var(--accent-light); text-decoration: none; display: flex; align-items: center; gap: 5px;"><i data-lucide="gem" style="width: 14px;"></i> Upgrade / Plans</a>426 unmodified lines}}checkAuth();lucide.createIcons();</script>150 unmodified lines151152153154155156157426 unmodified lines584585586587588589590591592593594595596597598599600601602603150 unmodified lines<div class="logo-group"><div class="logo-text">ViralFlow AI</div><div class="tag" id="user-plan" style="background: rgba(99, 102, 241, 0.1); color: var(--accent-light);">🛡️ FREE CREATOR</div><button id="god-mode-btn" onclick="activateTestGodMode()" style="margin-left: 10px; background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid #f59e0b; padding: 4px 10px; border-radius: 8px; font-size: 0.6rem; font-weight: 800; cursor: pointer;">⚡ ACTIVATE GOD MODE</button><a href="plans.html" id="nav-plans" style="margin-left: 15px; font-size: 0.8rem; font-weight: 700; color: var(--accent-light); text-decoration: none; display: flex; align-items: center; gap: 5px;"><i data-lucide="gem" style="width: 14px;"></i> Upgrade / Plans</a>426 unmodified lines}}async function activateTestGodMode() {if (!confirm("⚡ This will instantly upgrade you to ULTRA GOD MODE for testing. Proceed?")) return;const res = await fetch('/api/admin/upgrade-me', {method: 'POST',headers: { 'Authorization': `Bearer ${authToken}` }});if (res.ok) {alert("☢️ GOD MODE ACTIVATED! You now have unlimited channel access. 🚀");location.reload();} else {alert("Failed to activate God Mode. Check server logs.");}}checkAuth();lucide.createIcons();</script>
153 unmodified lines154155156157158159153 unmodified lines}});app.get('/api/auth/me', authenticateToken, async (req, res) => {try {let { data: user } = await db.from('users').select('email, role, plan, plan_expires_at').eq('id', req.userId).single();153 unmodified lines154155156157158159160161162163164165166167168169170171153 unmodified lines}});app.post('/api/admin/upgrade-me', authenticateToken, async (req, res) => {try {const { error } = await db.from('users').update({ plan: 'ultra', role: 'admin' }).eq('id', req.userId);if (error) throw error;res.json({ success: true });} catch (e) {res.status(500).json({ error: e.message });}});app.get('/api/auth/me', authenticateToken, async (req, res) => {try {let { data: user } = await db.from('users').select('email, role, plan, plan_expires_at').eq('id', req.userId).single();
dashboard/index.html+15
server.js+12