Add files via upload

This commit is contained in:
James 2025-10-05 22:38:42 -07:00 committed by GitHub
parent bbd1b3395a
commit f594dc5159
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 7 deletions

View File

@ -500,17 +500,11 @@
// Clicking the button should start Discord OAuth on your server.
// Adjust the path if your backend uses a different route.
document.getElementById('loginDiscord').addEventListener('click', (e) => {
// If already signed in, do nothing (or open account page)
const label = document.getElementById('whoami').textContent || '';
if (label.startsWith('Signed in as')) return;
e.preventDefault();
const redirect = encodeURIComponent(location.href);
// Common patterns you might be using on the Pi:
// /api/auth/discord or /auth/discord
// Change this to match your servers route.
location.href = `${API}/api/auth/discord?redirect=${redirect}`;
});
/* ===== Products (unique IDs) ===== */
const products = [