renaming functions to reflect activity.

This commit is contained in:
Ada Werefox 2025-04-23 10:31:51 -07:00
parent 7e3a8d1c81
commit 95421abae3

View file

@ -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")
}