ictgj-voting/public_endpoints.go
Brian Buller ba35073d95 2017-06-22 Build
* Use 'https://github.com/mjibson/esc' for embedded assets
* Pull database name out of siteData object
* Load site config from database, if available
* Allow customizing site config from command line arguments
* Clean up some templates
* Update Readme (it still needs a lot of updating)
* Started work on vote accumulation/management
2017-06-22 10:34:57 -05:00

22 lines
421 B
Go

package main
import (
"net/http"
)
func initPublicPage(w http.ResponseWriter, req *http.Request) *pageData {
p := InitPageData(w, req)
return p
}
func handleMain(w http.ResponseWriter, req *http.Request) {
page := initPublicPage(w, req)
page.SubTitle = ""
switch dbGetPublicSiteMode() {
case SiteModeWaiting:
page.show("public-waiting.html", w)
case SiteModeVoting:
page.show("public-voting.html", w)
}
}