Skip to content

Commit

Permalink
remove update copy
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Dec 5, 2024
1 parent 5509b96 commit b6b31a3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions controllers/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,8 @@ func updateNetwork(w http.ResponseWriter, r *http.Request) {
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "badrequest"))
return
}
// partial update
netOld2 := netOld1
_, _, _, err = logic.UpdateNetwork(&netOld1, &netOld2)

_, _, _, err = logic.UpdateNetwork(&netOld1, &payload)
if err != nil {
slog.Info("failed to update network", "user", r.Header.Get("user"), "err", err)
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "badrequest"))
Expand Down

0 comments on commit b6b31a3

Please sign in to comment.