Add files via upload
This commit is contained in:
parent
bbd1b3395a
commit
f594dc5159
|
|
@ -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 server’s route.
|
||||
location.href = `${API}/api/auth/discord?redirect=${redirect}`;
|
||||
});
|
||||
|
||||
|
||||
/* ===== Products (unique IDs) ===== */
|
||||
const products = [
|
||||
|
|
|
|||
Loading…
Reference in New Issue