From fe8cc7f52d48c396e7ead19625c8c9168fc21fdb Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Fri, 14 Feb 2025 22:55:37 +0200 Subject: [PATCH] fix login redirect using hx-redirect --- appview/pages/templates/user/login.html | 53 ++++++++++++------------- appview/state/state.go | 2 +- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/appview/pages/templates/user/login.html b/appview/pages/templates/user/login.html index 283e0fe5..0080aae8 100644 --- a/appview/pages/templates/user/login.html +++ b/appview/pages/templates/user/login.html @@ -14,35 +14,34 @@

tangled.sh

-
-
- - -
+ +
+ + +
-
- - -
+
+ + +
- +

diff --git a/appview/state/state.go b/appview/state/state.go index 267201e9..ab13180f 100644 --- a/appview/state/state.go +++ b/appview/state/state.go @@ -100,7 +100,7 @@ func (s *State) Login(w http.ResponseWriter, r *http.Request) { } log.Printf("successfully saved session for %s (%s)", atSession.Handle, atSession.Did) - http.Redirect(w, r, "/", http.StatusSeeOther) + s.pages.HxRedirect(w, "/") return } } -- 2.51.2