mirror of
https://github.com/documize/community.git
synced 2025-07-22 22:59:43 +02:00
refactored flag/env loading
This commit is contained in:
parent
dc49dbbeff
commit
68130122e7
23 changed files with 1128 additions and 909 deletions
|
@ -18,6 +18,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/documize/community/core/api"
|
||||
"github.com/documize/community/core/log"
|
||||
"github.com/documize/community/core/secrets"
|
||||
"github.com/documize/community/core/stringutil"
|
||||
|
@ -65,7 +66,7 @@ func Create(w http.ResponseWriter, r *http.Request) {
|
|||
target := "/setup"
|
||||
status := http.StatusBadRequest
|
||||
|
||||
if web.SiteMode == web.SiteModeNormal {
|
||||
if api.Runtime.Flags.SiteMode == web.SiteModeNormal {
|
||||
target = "/"
|
||||
status = http.StatusOK
|
||||
}
|
||||
|
@ -133,7 +134,7 @@ func Create(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
web.SiteMode = web.SiteModeNormal
|
||||
api.Runtime.Flags.SiteMode = web.SiteModeNormal
|
||||
}
|
||||
|
||||
// The result of completing the onboarding process.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue