ictgj-voting/public_endpoints.go

22 lines
421 B
Go
Raw Normal View History

2017-04-03 21:32:13 +00:00
package main
import (
"net/http"
)
func initPublicPage(w http.ResponseWriter, req *http.Request) *pageData {
2017-04-21 18:17:18 +00:00
p := InitPageData(w, req)
2017-04-03 21:32:13 +00:00
return p
}
func handleMain(w http.ResponseWriter, req *http.Request) {
page := initPublicPage(w, req)
2017-06-08 17:20:43 +00:00
page.SubTitle = ""
switch dbGetPublicSiteMode() {
case SiteModeWaiting:
page.show("public-waiting.html", w)
case SiteModeVoting:
page.show("public-voting.html", w)
2017-04-03 21:32:13 +00:00
}
}