1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-25 23:03:47 +01:00

feat: syncs all profile localStorage to disk (#2537)

This commit is contained in:
Amir Raminfar
2023-11-27 15:57:54 -08:00
committed by GitHub
parent b54b419a08
commit 60650ddc2c
12 changed files with 115 additions and 57 deletions

View File

@@ -65,10 +65,10 @@ func (h *handler) executeTemplate(w http.ResponseWriter, req *http.Request) {
user := auth.UserFromContext(req.Context())
if user != nil {
if settings, err := profile.LoadUserSettings(*user); err == nil {
config["serverSettings"] = settings
if profile, err := profile.Load(*user); err == nil {
config["profile"] = profile
} else {
config["serverSettings"] = struct{}{}
config["profile"] = struct{}{}
}
config["user"] = user
} else if h.config.Authorization.Provider == FORWARD_PROXY {