Skip to content

Commit

Permalink
Log only client name when adding or modifying
Browse files Browse the repository at this point in the history
  • Loading branch information
supaflyster committed Sep 22, 2024
1 parent 2fdafd3 commit 4fa3f01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions handler/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ func NewClient(db store.IStore) echo.HandlerFunc {
false, err.Error(),
})
}
log.Infof("Created wireguard client: %v", client)
log.Infof("Created wireguard client: %v", client.Name)

return c.JSON(http.StatusOK, client)
}
Expand Down Expand Up @@ -726,7 +726,7 @@ func UpdateClient(db store.IStore) echo.HandlerFunc {
if err := db.SaveClient(client); err != nil {
return c.JSON(http.StatusInternalServerError, jsonHTTPResponse{false, err.Error()})
}
log.Infof("Updated client information successfully => %v", client)
log.Infof("Updated client information successfully => %v", client.Name)

return c.JSON(http.StatusOK, jsonHTTPResponse{true, "Updated client successfully"})
}
Expand Down Expand Up @@ -821,7 +821,7 @@ func RemoveClient(db store.IStore) echo.HandlerFunc {
return c.JSON(http.StatusInternalServerError, jsonHTTPResponse{false, "Cannot delete client from database"})
}

log.Infof("Removed wireguard client: %v", client)
log.Infof("Removed wireguard client: %v", client.Name)
return c.JSON(http.StatusOK, jsonHTTPResponse{true, "Client removed"})
}
}
Expand Down

0 comments on commit 4fa3f01

Please sign in to comment.