Skip to content

Commit fb5aef8

Browse files
committed
Add trailing slash to default base_url
1 parent 55c2f0c commit fb5aef8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

metafold/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(
2525
client_id: Optional[str] = None,
2626
client_secret: Optional[str] = None,
2727
auth_domain: str = "metafold3d.us.auth0.com",
28-
base_url: str = "https://api.metafold3d.com",
28+
base_url: str = "https://api.metafold3d.com/",
2929
) -> None:
3030
"""Initialize Metafold API client.
3131

metafold/projects.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def create(
106106
"""
107107
if isinstance(access, str):
108108
access = check_access(access)
109-
payload = asdict(name=name, access=str(access), project=data)
109+
payload = asdict(name=name, access=access.value, project=data)
110110
r: Response = self._client.post("/projects", json=payload)
111111
return Project(**r.json())
112112

@@ -126,7 +126,7 @@ def duplicate(
126126
"""
127127
if isinstance(access, str):
128128
access = check_access(access)
129-
payload = asdict(source=id, name=name, access=str(access))
129+
payload = asdict(source=id, name=name, access=access.value)
130130
r: Response = self._client.post("/projects", json=payload)
131131
return Project(**r.json())
132132

@@ -158,7 +158,7 @@ def update(
158158
payload = asdict(name=name, project=data, graph=graph)
159159
# Access is optional, but we also need to cast to str
160160
if access:
161-
payload["access"] = str(access)
161+
payload["access"] = access.value
162162
r: Response = self._client.patch(url, json=payload)
163163
return Project(**r.json())
164164

0 commit comments

Comments
 (0)