summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Keuning <kkeuning@gmail.com>2017-02-25 21:22:09 -0600
committerKevin Keuning <kkeuning@gmail.com>2017-03-01 23:54:07 -0600
commita7db36aa56c1998bc56d593a38f2a1640a9298a0 (patch)
treee1d9f4bf85a28bb634d168b9950efd7014dbb188
parent1613413ecc3a88b2263c6ee31faa86ed615483d7 (diff)
added logging for failed user validation on api update
-rw-r--r--system/api/update.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/system/api/update.go b/system/api/update.go
index 93904dc..a669a9a 100644
--- a/system/api/update.go
+++ b/system/api/update.go
@@ -56,6 +56,7 @@ func updateContentHandler(res http.ResponseWriter, req *http.Request) {
}
if user.IsValid(req) == false {
+ log.Println("[Update] invalid user.")
res.WriteHeader(http.StatusBadRequest)
return
}
@@ -64,7 +65,7 @@ func updateContentHandler(res http.ResponseWriter, req *http.Request) {
ext, ok := post.(Updateable)
if !ok {
- log.Println("[Update] rejected non-replaceable type:", t, "from:", req.RemoteAddr)
+ log.Println("[Update] rejected non-updateable type:", t, "from:", req.RemoteAddr)
res.WriteHeader(http.StatusBadRequest)
return
}