Rename Config.GetClientConfig() to ClientConfig(), see #50

This commit is contained in:
Michael Mayer 2018-12-21 02:38:39 +01:00
parent 0f12aac73b
commit 40fae6a28f
4 changed files with 6 additions and 6 deletions

View file

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

View file

@ -13,7 +13,7 @@ type Config interface {
MigrateDb()
Db() *gorm.DB
GetClientConfig() frontend.Config
ClientConfig() frontend.Config
GetConfigFile() string
GetAppName() string

View file

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

View file

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