summaryrefslogtreecommitdiff
path: root/handlers/admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'handlers/admin.go')
-rw-r--r--handlers/admin.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/handlers/admin.go b/handlers/admin.go
index a77bed0..8413ac9 100644
--- a/handlers/admin.go
+++ b/handlers/admin.go
@@ -252,5 +252,7 @@ func CreateUserHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusCreated)
- json.NewEncoder(w).Encode(user)
+ if err := json.NewEncoder(w).Encode(user); err != nil {
+ logging.AppLog.Error("Failed to encode user to JSON", "error", err, "ip", ip)
+ }
}