Rename Config.GetTemplatesPath() to TemplatesPath(), see #50

This commit is contained in:
Michael Mayer 2018-12-21 03:40:19 +01:00
parent 3f2156a8fa
commit e87bf84532
4 changed files with 6 additions and 6 deletions

View file

@ -406,8 +406,8 @@ func (c *Config) ServerAssetsPath() string {
return c.AssetsPath() + "/server"
}
// GetTemplatesPath returns the server templates path.
func (c *Config) GetTemplatesPath() string {
// TemplatesPath returns the server templates path.
func (c *Config) TemplatesPath() string {
return c.ServerAssetsPath() + "/templates"
}

View file

@ -41,9 +41,9 @@ type Config interface {
ThumbnailsPath() string
TensorFlowModelPath() string
ServerAssetsPath() string
TemplatesPath() string
DarktableCli() string
GetTemplatesPath() string
GetFaviconsPath() string
GetPublicPath() string
GetPublicBuildPath() string

View file

@ -18,7 +18,7 @@ func Start(conf photoprism.Config) {
app := gin.Default()
// Set template directory
app.LoadHTMLGlob(conf.GetTemplatesPath() + "/*")
app.LoadHTMLGlob(conf.TemplatesPath() + "/*")
registerRoutes(app, conf)

View file

@ -263,8 +263,8 @@ func (c *Config) ServerAssetsPath() string {
return c.AssetsPath() + "/server"
}
// GetTemplatesPath returns the server templates path.
func (c *Config) GetTemplatesPath() string {
// TemplatesPath returns the server templates path.
func (c *Config) TemplatesPath() string {
return c.ServerAssetsPath() + "/templates"
}