mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 08:44:04 +01:00
Rename Config.GetServerMode() to HttpServerMode, see #50
This commit is contained in:
@@ -341,8 +341,8 @@ func (c *Config) HttpServerPort() int {
|
|||||||
return c.httpServerPort
|
return c.httpServerPort
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetServerMode returns the server mode.
|
// HttpServerMode returns the server mode.
|
||||||
func (c *Config) GetServerMode() string {
|
func (c *Config) HttpServerMode() string {
|
||||||
return c.serverMode
|
return c.serverMode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ type Config interface {
|
|||||||
|
|
||||||
HttpServerHost() string
|
HttpServerHost() string
|
||||||
HttpServerPort() int
|
HttpServerPort() int
|
||||||
|
HttpServerMode() string
|
||||||
|
|
||||||
GetServerMode() string
|
|
||||||
GetDatabaseDriver() string
|
GetDatabaseDriver() string
|
||||||
GetDatabaseDsn() string
|
GetDatabaseDsn() string
|
||||||
GetOriginalsPath() string
|
GetOriginalsPath() string
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
// Start the REST API server using the configuration provided
|
// Start the REST API server using the configuration provided
|
||||||
func Start(conf photoprism.Config) {
|
func Start(conf photoprism.Config) {
|
||||||
if conf.GetServerMode() != "" {
|
if conf.HttpServerMode() != "" {
|
||||||
gin.SetMode(conf.GetServerMode())
|
gin.SetMode(conf.HttpServerMode())
|
||||||
} else if conf.Debug() == false {
|
} else if conf.Debug() == false {
|
||||||
gin.SetMode(gin.ReleaseMode)
|
gin.SetMode(gin.ReleaseMode)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,8 +198,8 @@ func (c *Config) SqlServerPort() uint {
|
|||||||
return 4001
|
return 4001
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetServerMode returns the server mode.
|
// HttpServerMode returns the server mode.
|
||||||
func (c *Config) GetServerMode() string {
|
func (c *Config) HttpServerMode() string {
|
||||||
return "test"
|
return "test"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user