diff options
Diffstat (limited to 'internal/router/template.go')
-rw-r--r-- | internal/router/template.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/router/template.go b/internal/router/template.go index 315f44a56..c033c8f07 100644 --- a/internal/router/template.go +++ b/internal/router/template.go @@ -26,16 +26,15 @@ import ( "time" "github.com/gin-gonic/gin" - "github.com/spf13/viper" "github.com/superseriousbusiness/gotosocial/internal/api/model" "github.com/superseriousbusiness/gotosocial/internal/config" ) // LoadTemplates loads html templates for use by the given engine func loadTemplates(engine *gin.Engine) error { - templateBaseDir := viper.GetString(config.Keys.WebTemplateBaseDir) + templateBaseDir := config.GetWebTemplateBaseDir() if templateBaseDir == "" { - return fmt.Errorf("%s cannot be empty and must be a relative or absolute path", config.Keys.WebTemplateBaseDir) + return fmt.Errorf("%s cannot be empty and must be a relative or absolute path", config.WebTemplateBaseDirFlag()) } templateBaseDir, err := filepath.Abs(templateBaseDir) |