From 3bc9c49307d1e2cfcc6e54d72c0ee277a26c4dbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric?= <35066297+c3do@users.noreply.github.com> Date: Mon, 28 Sep 2020 16:57:30 +0200 Subject: [PATCH] Update api_orders.class.php --- htdocs/commande/class/api_orders.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index d89c2770f64..4c3def4b796 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -547,7 +547,7 @@ class Orders extends DolibarrApi * @param int $rowid Row key of the contact in the array contact_ids. * @param string $type Type of the contact (BILLING, SHIPPING, CUSTOMER). * - * @url DELETE {id}/contact/{rowid}/{type} + * @url DELETE {id}/contact/{contactid}/{type} * * @return int * @@ -555,7 +555,7 @@ class Orders extends DolibarrApi * @throws RestException 404 * @throws RestException 500 */ - public function deleteContact($id, $rowid, $type) + public function deleteContact($id, $contactid, $type) { if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); @@ -573,7 +573,7 @@ class Orders extends DolibarrApi $contacts = $this->commande->liste_contact(); foreach ($contacts as $contact) { - if ($contact['id'] == $rowid && $contact['code'] == $type) { + if ($contact['id'] == $contactid && $contact['code'] == $type) { $result = $this->commande->delete_contact($contact['rowid']); if (!$result) {