Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions socketdev/repos/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
import logging
from typing import List, Optional
from dataclasses import dataclass, asdict
Expand Down Expand Up @@ -131,9 +132,10 @@ def post(self, org_slug: str, **kwargs) -> dict:
return {}

path = "orgs/" + org_slug + "/repos"
response = self.api.do_request(path=path, method="POST", payload=params.__dict__)
payload = json.dumps(params)
response = self.api.do_request(path=path, method="POST", payload=payload)

if response.status_code == 200:
if response.status_code == 201:
result = response.json()
return result

Expand All @@ -150,7 +152,8 @@ def update(self, org_slug: str, repo_name: str, **kwargs) -> dict:
return {}

path = f"orgs/{org_slug}/repos/{repo_name}"
response = self.api.do_request(path=path, method="POST", payload=params.__dict__)
payload = json.dumps(params)
response = self.api.do_request(path=path, method="POST", payload=payload)

if response.status_code == 200:
result = response.json()
Expand Down
2 changes: 1 addition & 1 deletion socketdev/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.0.5"
__version__ = "2.0.6"
Loading