aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index a8d897d..f7e2078 100644
--- a/main.go
+++ b/main.go
@@ -147,7 +147,7 @@ func pageHandler(w http.ResponseWriter, r *http.Request) {
Open uint64
Done uint64
IsAdmin bool
- }{open.Load(), done.Load() + 1, r.URL.Query().Has("admin")}
+ }{open.Load(), done.Load() + 1, r.URL.Query().Has(*passwd)}
if err := pageTemplate.Execute(w, tempData); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
@@ -172,7 +172,8 @@ func doneHandler(w http.ResponseWriter, r *http.Request) {
}
}
-var port = flag.Int("p", 8080, "the port to use")
+var port = flag.Int("port", 8080, "the port to use")
+var passwd = flag.String("password", "admin", "the admin password")
func main() {
flag.Parse()