From 24e6859aa04fbab9e3715ee88cfadd149a238fa6 Mon Sep 17 00:00:00 2001 From: Glenn Thompson Date: Fri, 14 Nov 2025 09:10:43 +0300 Subject: [PATCH] fix: Admin login and authentication issues - Fix undefined uri-path function - use radiance:path instead - Fix redirect paths for subdomain routing (remove /asteroid prefix) - Add error handling and debug logging to admin page - Fix login redirect to use correct paths for asteroid.localhost - Add debug output to track authentication flow --- asteroid.lisp | 12 ++++++------ auth-routes.lisp | 2 +- template/frameset-wrapper.ctml | 2 +- template/front-page-content.ctml | 11 +++++++++-- template/front-page.ctml | 11 +++++++++-- template/login.ctml | 8 +++++++- template/player-content.ctml | 6 +++++- template/player.ctml | 9 ++++++++- template/register.ctml | 8 +++++++- user-management.lisp | 10 +++++++--- 10 files changed, 60 insertions(+), 19 deletions(-) diff --git a/asteroid.lisp b/asteroid.lisp index d583cf5..c96bdab 100644 --- a/asteroid.lisp +++ b/asteroid.lisp @@ -425,8 +425,8 @@ "Main front page" (clip:process-to-string (load-template "front-page") - :title "🎵 ASTEROID RADIO 🎵" - :station-name "🎵 ASTEROID RADIO 🎵" + :title "ASTEROID RADIO" + :station-name "ASTEROID RADIO" :status-message "🟢 LIVE - Broadcasting asteroid music for hackers" :listeners "0" :stream-quality "128kbps MP3" @@ -444,15 +444,15 @@ "Frameset wrapper with persistent audio player" (clip:process-to-string (load-template "frameset-wrapper") - :title "🎵 ASTEROID RADIO 🎵")) + :title "ASTEROID RADIO")) ;; Content frame - front page content without player (define-page front-page-content #@"/content" () "Front page content (displayed in content frame)" (clip:process-to-string (load-template "front-page-content") - :title "🎵 ASTEROID RADIO 🎵" - :station-name "🎵 ASTEROID RADIO 🎵" + :title "ASTEROID RADIO" + :station-name "ASTEROID RADIO" :status-message "🟢 LIVE - Broadcasting asteroid music for hackers" :listeners "0" :stream-quality "128kbps MP3" @@ -601,7 +601,7 @@ (require-authentication) (clip:process-to-string (load-template "users") - :title "🎵 ASTEROID RADIO - User Management")) + :title "ASTEROID RADIO - User Management")) ;; User Profile page (requires authentication) (define-page user-profile #@"/profile" () diff --git a/auth-routes.lisp b/auth-routes.lisp index 559d99b..10ff630 100644 --- a/auth-routes.lisp +++ b/auth-routes.lisp @@ -51,7 +51,7 @@ (define-page logout #@"/logout" () "Handle user logout" (setf (session:field "user-id") nil) - (radiance:redirect "/asteroid/")) + (radiance:redirect "/")) ;; API: Get all users (admin only) (define-api asteroid/users () () diff --git a/template/frameset-wrapper.ctml b/template/frameset-wrapper.ctml index 0cf1f2e..648e2b4 100644 --- a/template/frameset-wrapper.ctml +++ b/template/frameset-wrapper.ctml @@ -1,7 +1,7 @@ - 🎵 ASTEROID RADIO 🎵 + ASTEROID RADIO @@ -11,7 +14,11 @@
-

🎵 ASTEROID RADIO 🎵

+

+ Asteroid + ASTEROID RADIO + Asteroid +