Rename Config.GetServerMode() to HttpServerMode, see #50
This commit is contained in:
parent
f0c947ddfb
commit
ef2719e21e
4 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@ type Config interface {
|
|||
|
||||
HttpServerHost() string
|
||||
HttpServerPort() int
|
||||
HttpServerMode() string
|
||||
|
||||
GetServerMode() string
|
||||
GetDatabaseDriver() string
|
||||
GetDatabaseDsn() string
|
||||
GetOriginalsPath() string
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue