summaryrefslogtreecommitdiff
path: root/server/main.go
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2019-09-20 16:46:10 -0400
committerBen Burwell <ben@benburwell.com>2019-09-20 16:46:10 -0400
commite1f8ea2a889494859a61a9259110e40c70002d55 (patch)
tree52a96d1e80840512cac11449b549ceada1f24ef1 /server/main.go
parente1eee80afa1ddf579aea52435c69813459ce3811 (diff)
Simplify examples
Diffstat (limited to 'server/main.go')
-rw-r--r--server/main.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/server/main.go b/server/main.go
index 23f2959..9ebcb22 100644
--- a/server/main.go
+++ b/server/main.go
@@ -8,16 +8,12 @@ import (
)
func main() {
- server := handleCaesar(TokenAuthenticator())
+ server := handleCaesar()
http.ListenAndServe(":8088", server)
}
-func handleCaesar(auth Authenticator) http.HandlerFunc {
+func handleCaesar() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- if !auth(r) {
- w.WriteHeader(http.StatusUnauthorized)
- return
- }
if r.Method != http.MethodPost {
w.WriteHeader(http.StatusBadRequest)
return