Skip to content

Commit

Permalink
chore (debug): additional debug information
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-kerjean committed Mar 5, 2024
1 parent ae70b69 commit ab14520
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions server/ctrl/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"github.com/gorilla/mux"
. "github.com/mickael-kerjean/filestash/server/common"
"github.com/mickael-kerjean/filestash/server/middleware"
"github.com/mickael-kerjean/filestash/server/model"
"net/http"
"net/url"
"os"
"strings"
"text/template"
"time"

. "github.com/mickael-kerjean/filestash/server/common"
"github.com/mickael-kerjean/filestash/server/middleware"
"github.com/mickael-kerjean/filestash/server/model"

"github.com/gorilla/mux"
)

type Session struct {
Expand Down Expand Up @@ -384,10 +386,12 @@ func SessionAuthMiddleware(ctx *App, res http.ResponseWriter, req *http.Request)
Parse(str)
mappingToUse[k] = str
if err != nil {
Log.Debug("session::authMiddleware 'template creation failed %s'", err.Error())
continue
}
var b bytes.Buffer
if err = tmpl.Execute(&b, tb); err != nil {
Log.Debug("session::authMiddleware 'template execution failed %s'", err.Error())
continue
}
mappingToUse[k] = b.String()
Expand Down

0 comments on commit ab14520

Please sign in to comment.