mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
refactored routing/web serving logic
This commit is contained in:
parent
76d77bef9b
commit
d888962082
16 changed files with 410 additions and 382 deletions
|
@ -19,7 +19,7 @@ import (
|
|||
"github.com/documize/community/core/database"
|
||||
"github.com/documize/community/core/env"
|
||||
"github.com/documize/community/core/secrets"
|
||||
"github.com/documize/community/core/web"
|
||||
"github.com/documize/community/server/web"
|
||||
"github.com/jmoiron/sqlx"
|
||||
)
|
||||
|
||||
|
@ -68,7 +68,7 @@ func InitRuntime(r *env.Runtime) bool {
|
|||
// go into setup mode if required
|
||||
if r.Flags.SiteMode != web.SiteModeOffline {
|
||||
if database.Check(r) {
|
||||
if err := database.Migrate(true /* the config table exists */); err != nil {
|
||||
if err := database.Migrate(*r, true /* the config table exists */); err != nil {
|
||||
r.Log.Error("unable to run database migration", err)
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue