diff --git a/backend/app/main.py b/backend/app/main.py index b7feee1..6dc929e 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -581,8 +581,8 @@ async def trigger_imap_poll(auth: dict = Depends(require_admin_auth)): } -# API endpoint to check status of IMAP polling -@app.get("/api/v1/admin/poll-status") +# API endpoint to check status of IMAP polling (public, read-only) +@app.get("/api/v1/poll-status") async def get_poll_status(): """ Get the status of IMAP polling (read-only, no authentication required). diff --git a/backend/app/templates/index.html b/backend/app/templates/index.html index f62eef2..badb426 100644 --- a/backend/app/templates/index.html +++ b/backend/app/templates/index.html @@ -199,7 +199,7 @@ function dashboardApp() { async getImapStatus() { try { - const response = await fetch('/api/v1/admin/poll-status'); + const response = await fetch('/api/v1/poll-status'); if (!response.ok) { console.error('Error checking IMAP status:', response.status); return;