From 365411b5dfae95a0fe573eb8a11d092694d43a1e Mon Sep 17 00:00:00 2001 From: David Andersen Date: Thu, 7 Mar 2024 13:51:58 -0800 Subject: [PATCH 1/2] removed unused fields --- src/awsed/types.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/awsed/types.py b/src/awsed/types.py index 19799cf..bcaa215 100644 --- a/src/awsed/types.py +++ b/src/awsed/types.py @@ -77,29 +77,17 @@ class UserResultJson: @dataclass class UserRequestJson: - username: str - firstName: Optional[str] - lastName: Optional[str] roles: Optional[List[str]] - apiKey: Optional[str] - uid: int + uid: Optional[int] homeFileSystem: Optional[str] def __init__( self, - username=None, - firstName=None, - lastName=None, roles=None, - apiKey=None, uid=None, homeFileSystem=None, ): - self.username = username - self.firstName = firstName - self.lastName = lastName self.roles = roles - self.apiKey = apiKey self.uid = uid self.homeFileSystem = homeFileSystem From 87c1ada03a3292bc83be6d89d5a7ccc035ffd21d Mon Sep 17 00:00:00 2001 From: David Andersen Date: Thu, 7 Mar 2024 14:07:47 -0800 Subject: [PATCH 2/2] send application/json --- src/awsed/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/awsed/client.py b/src/awsed/client.py index 51dcfe8..e3e4a1f 100644 --- a/src/awsed/client.py +++ b/src/awsed/client.py @@ -271,7 +271,7 @@ def patch_request( ) -> requests.Response: full_url = self.endpoint + url headers = headers or self.auth() - + headers['Content-Type'] = 'application/json' data_json = json.dumps(data, default=lambda o: o.__dict__) result = requests.patch(