diff --git a/build/api/module/machineDefault.php b/build/api/module/machineDefault.php index bc8b7f1..be17c97 100755 --- a/build/api/module/machineDefault.php +++ b/build/api/module/machineDefault.php @@ -684,14 +684,14 @@ /* (3) Mise à jour de l'identité de la machine (ap-ip) */ $updateNetId = new Repo('machine/updateNetworkIdentity', [ $_SESSION['WAREHOUSE']['id'], - $id_machine, + $_SESSION['SATS']['id'], $fetched['identity']['ap'], $fetched['identity']['ip'] ]); /* (2) On gère l'erreur */ - if( !$updateNetId->answer() ) - return [ 'error' => new Error(Err::RepoError), 'details' => $updatedNetId->answer() ]; + if( $updateNetId->error->get() != Err::Success || !$updateNetId->answer() ) + return [ 'error' => new Error(Err::RepoError), 'details' => $updateNetId->answer() ]; /* [3] Gestion des données à envoyer