Rename Config.GetServerMode() to HttpServerMode, see #50

This commit is contained in:
Michael Mayer 2018-12-21 03:18:01 +01:00
parent f0c947ddfb
commit ef2719e21e
4 changed files with 7 additions and 7 deletions

View file

@ -341,8 +341,8 @@ func (c *Config) HttpServerPort() int {
return c.httpServerPort
}
// GetServerMode returns the server mode.
func (c *Config) GetServerMode() string {
// HttpServerMode returns the server mode.
func (c *Config) HttpServerMode() string {
return c.serverMode
}

View file

@ -27,8 +27,8 @@ type Config interface {
HttpServerHost() string
HttpServerPort() int
HttpServerMode() string
GetServerMode() string
GetDatabaseDriver() string
GetDatabaseDsn() string
GetOriginalsPath() string

View file

@ -9,8 +9,8 @@ import (
// Start the REST API server using the configuration provided
func Start(conf photoprism.Config) {
if conf.GetServerMode() != "" {
gin.SetMode(conf.GetServerMode())
if conf.HttpServerMode() != "" {
gin.SetMode(conf.HttpServerMode())
} else if conf.Debug() == false {
gin.SetMode(gin.ReleaseMode)
}

View file

@ -198,8 +198,8 @@ func (c *Config) SqlServerPort() uint {
return 4001
}
// GetServerMode returns the server mode.
func (c *Config) GetServerMode() string {
// HttpServerMode returns the server mode.
func (c *Config) HttpServerMode() string {
return "test"
}