This commit is contained in:
@@ -286,7 +286,7 @@ async function addComment(eventId, el) {
|
||||
const input = container.querySelector('.comment-input');
|
||||
const body = input.value.trim();
|
||||
if (!body) return;
|
||||
const author = prompt('Your name:') || 'Anonymous';
|
||||
const author = currentUser || 'Anonymous';
|
||||
await apiFetch('comments', { method: 'POST', body: JSON.stringify({ event_id: eventId, author, body }) });
|
||||
input.value = '';
|
||||
loadEvents();
|
||||
|
||||
Reference in New Issue
Block a user