renaming functions to reflect activity.
This commit is contained in:
parent
7e3a8d1c81
commit
95421abae3
1 changed files with 4 additions and 4 deletions
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue