commit b07fa1306792576f147ea60a1d66c83a29759798
parent dbd4c97b0ba76ac048601b9e302c30ea93f5812d
Author: Ryan Wolf <johnwayne@pseudony.ms>
Date: Sun, 17 Feb 2019 10:41:06 -0500
gofmt
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/novelty.go b/novelty.go
@@ -5,7 +5,7 @@ import (
"appengine/datastore"
"html/template"
"net/http"
- "os"
+ "os"
)
type Answer struct {
@@ -38,11 +38,11 @@ func getAnswer(w http.ResponseWriter, r *http.Request) {
func setAnswer(answer string) func(w http.ResponseWriter, r *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
- if _, p, ok := r.BasicAuth(); !ok || p != os.Getenv("PASSWORD") {
+ if _, p, ok := r.BasicAuth(); !ok || p != os.Getenv("PASSWORD") {
w.Header().Set("WWW-Authenticate", "Basic")
http.Error(w, "Unauthorized", http.StatusUnauthorized)
return
- }
+ }
c := appengine.NewContext(r)
k := datastore.NewKey(c, "Answer", "answer", 0, nil)
a := Answer{