Browse Source

Removed bunch of dead code.

pull/3/head
Simon Eisenmann 12 years ago
parent
commit
0e76d60f22
  1. 9
      src/app/spreed-speakfreely-server/main.go

9
src/app/spreed-speakfreely-server/main.go

@ -46,7 +46,6 @@ var defaultConfig = "./server.conf" @@ -46,7 +46,6 @@ var defaultConfig = "./server.conf"
var templates *template.Template
var config *Config
var htmlApp string
// Helper to retrieve languages from request.
func getRequestLanguages(r *http.Request, supported_languages []string) []string {
@ -109,7 +108,7 @@ func handleRoomView(room string, w http.ResponseWriter, r *http.Request) { @@ -109,7 +108,7 @@ func handleRoomView(room string, w http.ResponseWriter, r *http.Request) {
}
// Prepare context to deliver to Javascript.
context := &Context{Cfg: config, App: htmlApp, Host: r.Host, Ssl: ssl, Languages: langs}
context := &Context{Cfg: config, App: "main", Host: r.Host, Ssl: ssl, Languages: langs}
// Render the template.
err := templates.ExecuteTemplate(w, "mainPage", &context)
@ -133,12 +132,6 @@ func runner(runtime phoenix.Runtime) error { @@ -133,12 +132,6 @@ func runner(runtime phoenix.Runtime) error {
return fmt.Errorf("Configured root '%s' is not a directory.", rootFolder)
}
htmlApp = "main"
if httputils.HasFilePath(path.Join(rootFolder, "static", "js", "main.min.js")) {
runtime.Print("Using minimized javascript application.")
htmlApp = "main.un"
}
if !httputils.HasFilePath(path.Join(rootFolder, "static", "css", "main.min.css")) {
return fmt.Errorf("Unable to find client. Path correct and compiled css?")
}

Loading…
Cancel
Save