More fixes
This commit is contained in:
@@ -3,7 +3,6 @@ package internal
|
||||
import (
|
||||
"html/template"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vcraescu/go-paginator"
|
||||
@@ -116,16 +115,5 @@ func NewContext(conf *Config, db Store, req *http.Request) *Context {
|
||||
ctx.IsAdmin = true
|
||||
}
|
||||
|
||||
// Set the theme based on user preferences
|
||||
theme := strings.ToLower(ctx.User.Theme)
|
||||
switch theme {
|
||||
case "", "auto":
|
||||
ctx.Theme = ""
|
||||
case "light", "dark":
|
||||
ctx.Theme = theme
|
||||
default:
|
||||
log.WithField("name", theme).Warn("invalid theme found")
|
||||
}
|
||||
|
||||
return ctx
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user