diff --git a/GLPIAPI.py b/GLPIAPI.py index 173da38..831103a 100644 --- a/GLPIAPI.py +++ b/GLPIAPI.py @@ -207,15 +207,15 @@ class GLPIAPI: uri = f"{self.Server}/apirest.php/Computer/" return requests.put(uri, headers=self.Headers, json=body) - def UpdateUser(self, deviceid, username): + def UpdateItemUser(self, itemID, itemType, username): body = { "input" : { - "id" : deviceid, + "id" : itemID, "users_id" : username } } - uri = f"{self.Server}/apirest.php/Computer/" + uri = f"{self.Server}/apirest.php/itemType/" return requests.put(uri, headers=self.Headers, json=body) def SetCustomField(self, itemType, containerName, containerID, itemId, fieldName, data):