From ec901d97c2daf2131091ce7e65c2e8acad156af6 Mon Sep 17 00:00:00 2001 From: Gregory Wells Date: Thu, 6 Aug 2026 20:25:44 -0400 Subject: [PATCH] change user endpoint to calandar --- auth/oauth_callback.go | 3 +-- main/calandar_endpoint.go | 2 +- main/main.go | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/auth/oauth_callback.go b/auth/oauth_callback.go index 8fda03f..f4d4b72 100644 --- a/auth/oauth_callback.go +++ b/auth/oauth_callback.go @@ -44,10 +44,9 @@ func OAuthCallback(w http.ResponseWriter, r *http.Request) { return } - // Store the token securely if err := TestTokenStore.Save(token); err != nil { log.Printf("Failed to save token: %v", err) } - http.Redirect(w, r, "/user", http.StatusTemporaryRedirect) + http.Redirect(w, r, "/calandar", http.StatusTemporaryRedirect) } diff --git a/main/calandar_endpoint.go b/main/calandar_endpoint.go index df8fa3c..611de58 100644 --- a/main/calandar_endpoint.go +++ b/main/calandar_endpoint.go @@ -9,7 +9,7 @@ import ( "astraltech.xyz/calendar/v2/auth" ) -func handleUser(w http.ResponseWriter, r *http.Request) { +func HandleCalandarEndpoint(w http.ResponseWriter, r *http.Request) { token, err := auth.TestTokenStore.Load() if err != nil { http.Error(w, "Not authenticated", http.StatusUnauthorized) diff --git a/main/main.go b/main/main.go index 78784e5..d4685c4 100644 --- a/main/main.go +++ b/main/main.go @@ -21,7 +21,7 @@ func main() { AuthRequestFunction: auth.HandleAuthRequest, }) webserver.ServeWebpage("/callback", auth.OAuthCallback) - webserver.ServeWebpage("/user", handleUser) + webserver.ServeWebpage("/calandar", HandleCalandarEndpoint) webserver.EnableLogoRoute() webserver.EnableStaticRoute()