Unverified Commit 6ab0d2d3 authored by Fernando Takagi's avatar Fernando Takagi Committed by GitHub
Browse files

Init and clone new configs (#1011)

- Fix for the configuration console view
parent f3a16739
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -481,6 +481,7 @@ func NewConfig(logger *zap.Logger) *config {
		Leaderboard:      NewLeaderboardConfig(),
		Matchmaker:       NewMatchmakerConfig(),
		IAP:              NewIAPConfig(),
		GoogleAuth:       NewGoogleAuthConfig(),
		Satori:           NewSatoriConfig(),
	}
}
@@ -499,6 +500,8 @@ func (c *config) Clone() (Config, error) {
	configLeaderboard := *(c.Leaderboard)
	configMatchmaker := *(c.Matchmaker)
	configIAP := *(c.IAP)
	configSatori := *(c.Satori)
	configGoogleAuth := *(c.GoogleAuth)
	nc := &config{
		Name:             c.Name,
		Datadir:          c.Datadir,
@@ -516,6 +519,8 @@ func (c *config) Clone() (Config, error) {
		Leaderboard:      &configLeaderboard,
		Matchmaker:       &configMatchmaker,
		IAP:              &configIAP,
		Satori:           &configSatori,
		GoogleAuth:       &configGoogleAuth,
	}
	nc.Socket.CertPEMBlock = make([]byte, len(c.Socket.CertPEMBlock))
	copy(nc.Socket.CertPEMBlock, c.Socket.CertPEMBlock)