[#6] Add admin panel at /admin
- Password-protected (cabo2026) admin page - View/approve/reject pending options - Delete any option - Toggle polls open/closed - Live stats: voters, options, votes, pending count - Add DELETE /api/options/:id endpoint - Add option_deleted WebSocket broadcast
This commit is contained in:
@@ -780,6 +780,10 @@
|
||||
renderTabs();
|
||||
render();
|
||||
}
|
||||
} else if (msg.type === 'option_deleted') {
|
||||
state.options = state.options.filter(o => o.id !== msg.id);
|
||||
renderTabs();
|
||||
render();
|
||||
} else if (msg.type === 'polls_status') {
|
||||
state.pollsOpen = msg.open;
|
||||
updatePollsBadge();
|
||||
|
||||
Reference in New Issue
Block a user