fixes lol
All checks were successful
Build and Push / build-all (push) Successful in 8m35s

This commit is contained in:
doomtube 2026-01-09 21:38:32 -05:00
parent 2e376269c2
commit c65967acd6
2 changed files with 43 additions and 14 deletions

View file

@ -1619,8 +1619,20 @@
async function loadUberbannedFingerprints() {
try {
// Fetch JWT token for chat-service authentication
const tokenResp = await fetch('/api/user/token', { credentials: 'include' });
if (!tokenResp.ok) {
console.error('Failed to load uberbanned fingerprints');
return;
}
const tokenData = await tokenResp.json();
const token = tokenData.token;
const response = await fetch('/api/chat/uberbanned', {
credentials: 'include'
credentials: 'include',
headers: {
'Authorization': `Bearer ${token}`
}
});
if (response.ok) {
@ -1639,9 +1651,22 @@
if (!confirm(`Remove uberban for fingerprint ${truncated}?\n\nThis will allow this device to access the site again.`)) return;
try {
// Fetch JWT token for chat-service authentication
const tokenResp = await fetch('/api/user/token', { credentials: 'include' });
if (!tokenResp.ok) {
error = 'Failed to authenticate';
setTimeout(() => { error = ''; }, 3000);
return;
}
const tokenData = await tokenResp.json();
const token = tokenData.token;
const response = await fetch('/api/chat/unuberban', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
credentials: 'include',
body: JSON.stringify({ fingerprint })
});