From 40fae6a28f9d48eb7a73ecc0bbe9a8613655b059 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Fri, 21 Dec 2018 02:38:39 +0100 Subject: [PATCH] Rename Config.GetClientConfig() to ClientConfig(), see #50 --- internal/context/config.go | 4 ++-- internal/photoprism/config.go | 2 +- internal/server/routes.go | 2 +- internal/test/config.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/context/config.go b/internal/context/config.go index f9562f32c..4bd6ec7de 100644 --- a/internal/context/config.go +++ b/internal/context/config.go @@ -449,8 +449,8 @@ func (c *Config) MigrateDb() { &models.Country{}) } -// GetClientConfig returns a loaded and set configuration entity. -func (c *Config) GetClientConfig() frontend.Config { +// ClientConfig returns a loaded and set configuration entity. +func (c *Config) ClientConfig() frontend.Config { db := c.Db() var cameras []*models.Camera diff --git a/internal/photoprism/config.go b/internal/photoprism/config.go index e0f717137..a04172422 100644 --- a/internal/photoprism/config.go +++ b/internal/photoprism/config.go @@ -13,7 +13,7 @@ type Config interface { MigrateDb() Db() *gorm.DB - GetClientConfig() frontend.Config + ClientConfig() frontend.Config GetConfigFile() string GetAppName() string diff --git a/internal/server/routes.go b/internal/server/routes.go index f47b134c3..7dd636c42 100644 --- a/internal/server/routes.go +++ b/internal/server/routes.go @@ -27,6 +27,6 @@ func registerRoutes(app *gin.Engine, conf photoprism.Config) { // Default HTML page (client-side routing implemented via Vue.js) app.NoRoute(func(c *gin.Context) { - c.HTML(http.StatusOK, "index.tmpl", conf.GetClientConfig()) + c.HTML(http.StatusOK, "index.tmpl", conf.ClientConfig()) }) } diff --git a/internal/test/config.go b/internal/test/config.go index 896fb7c46..cd74f8b6a 100644 --- a/internal/test/config.go +++ b/internal/test/config.go @@ -306,8 +306,8 @@ func (c *Config) MigrateDb() { &models.Country{}) } -// GetClientConfig returns a loaded and set configuration entity. -func (c *Config) GetClientConfig() frontend.Config { +// ClientConfig returns a loaded and set configuration entity. +func (c *Config) ClientConfig() frontend.Config { db := c.Db() var cameras []*models.Camera