summaryrefslogtreecommitdiff
path: root/handlers/admin.go
diff options
context:
space:
mode:
authorhaturatu <taro@eyes4you.org>2025-10-13 17:15:15 +0900
committerhaturatu <taro@eyes4you.org>2025-10-13 17:15:15 +0900
commit89e0c1cd5aa807ab2501df1902979a18d4a0ba70 (patch)
treea31be26736cc4164631874a1137bf9bb67b8366e /handlers/admin.go
parentb5b535c4cd5ce0eebf0560a65e067b40aecb3d43 (diff)
fix(lint): err check, ioutil.ReadAll -> io.ReadAll
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)
+ }
}