apiService should not reference global variable 'locations' (hinders testing)

This commit is contained in:
Jakob Borg
2016-03-13 11:03:00 +01:00
parent 032365d57c
commit ba5231dc89
2 changed files with 8 additions and 4 deletions

View File

@@ -983,7 +983,7 @@ func setupGUI(mainService *suture.Supervisor, cfg *config.Wrapper, m *model.Mode
l.Warnln("Insecure admin access is enabled.")
}
api, err := newAPIService(myID, cfg, runtimeOptions.assetDir, m, apiSub, discoverer, relayService, errors, systemLog)
api, err := newAPIService(myID, cfg, locations[locHTTPSCertFile], locations[locHTTPSKeyFile], runtimeOptions.assetDir, m, apiSub, discoverer, relayService, errors, systemLog)
if err != nil {
l.Fatalln("Cannot start GUI:", err)
}