Skip to content

Commit

Permalink
Adding debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
COMTOP1 committed Jan 6, 2025
1 parent da314a5 commit b08eeff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/views/views.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ func (v *Views) Authenticated(next echo.HandlerFunc) echo.HandlerFunc {

token, ok := session.Values["token"].(string)
if ok {
fmt.Println(1)
req, err = http.NewRequestWithContext(c.Request().Context(), "GET",
v.conf.AuthEndpoint+"/api/test", nil)
if err != nil {
Expand Down Expand Up @@ -256,6 +257,7 @@ func (v *Views) Authenticated(next echo.HandlerFunc) echo.HandlerFunc {
}

getToken:
fmt.Println(2)
req, err = http.NewRequestWithContext(c.Request().Context(), "GET",
v.conf.AuthEndpoint+"/api/set_token", nil)
if err != nil {
Expand Down Expand Up @@ -304,6 +306,7 @@ func (v *Views) Authenticated(next echo.HandlerFunc) echo.HandlerFunc {
return next(c)

login:
fmt.Println(3)
return c.Redirect(http.StatusTemporaryRedirect, fmt.Sprintf("%s/login?callback=https://%s%s",
v.conf.AuthEndpoint,
v.conf.StreamerWebAddress,
Expand Down

0 comments on commit b08eeff

Please sign in to comment.