mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
refactor: move config to separate package
chore: load config from main method
This commit is contained in:
@@ -2,7 +2,7 @@ package routes
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/muety/wakapi/models"
|
||||
"github.com/muety/wakapi/config"
|
||||
"github.com/muety/wakapi/utils"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
@@ -25,10 +25,10 @@ func loadTemplates() {
|
||||
"title": strings.Title,
|
||||
"capitalize": utils.Capitalize,
|
||||
"getBasePath": func() string {
|
||||
return models.GetConfig().BasePath
|
||||
return config.Get().BasePath
|
||||
},
|
||||
"getVersion": func() string {
|
||||
return models.GetConfig().Version
|
||||
return config.Get().Version
|
||||
},
|
||||
"htmlSafe": func(html string) template.HTML {
|
||||
return template.HTML(html)
|
||||
|
Reference in New Issue
Block a user