1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-20 05:39:42 +02:00

refactored routing/web serving logic

This commit is contained in:
Harvey Kandola 2017-07-21 18:14:19 +01:00
parent 76d77bef9b
commit d888962082
16 changed files with 410 additions and 382 deletions

View file

@ -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
}