From 95421abae3d4f538c55db7ddce4ea911c8dfe80c Mon Sep 17 00:00:00 2001 From: Ada Werefox Date: Wed, 23 Apr 2025 10:31:51 -0700 Subject: [PATCH] renaming functions to reflect activity. --- gin-cpularp.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gin-cpularp.go b/gin-cpularp.go index 9c00469..e882656 100644 --- a/gin-cpularp.go +++ b/gin-cpularp.go @@ -184,7 +184,7 @@ func createOrUpdateUser(context *gin.Context, oauthToken *oauth2.Token, user dis } } -func dashboardDisplay(context *gin.Context) { +func getDashboardInfo(context *gin.Context) { oauthTokenJSON, err := context.Cookie("discord-oauthtoken") log.Println(oauthTokenJSON) if err == nil { @@ -210,7 +210,7 @@ func dashboardDisplay(context *gin.Context) { context.Redirect(http.StatusTemporaryRedirect, "/") } -func isUserAutorized(context *gin.Context) { +func isUserAuthorized(context *gin.Context) { oauthTokenJSON, err := context.Cookie("discord-oauthtoken") log.Printf("Something something: %s", oauthTokenJSON) if err == nil { @@ -249,7 +249,7 @@ func main() { app.GET("/login", loginRedirect) app.GET("/auth/callback", authCallback) app.GET("/logout", logoutRedirect) - app.GET("/dashboard", dashboardDisplay) - app.GET("/authorized", isUserAutorized) + app.GET("/dashboard", getDashboardInfo) + app.GET("/authorized", isUserAuthorized) app.Run(":31337") }