Skip to content

Commit 0102bcb

Browse files
committed
fix: remove trailing slashes from base url and assignments class formatter
1 parent 86dc1e5 commit 0102bcb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

codepost/models/abstract/api_resource.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,7 @@ def instance_endpoint_by_id(self, id=None):
289289
pass
290290

291291
# CASE 2: The class end point has not formatting parameter
292-
# NOTE: Trailing slash important (API bug)
293-
return urljoin(self.class_endpoint, "{}/".format(_id))
292+
return urljoin(self.class_endpoint, "{}".format(_id))
294293

295294
@property
296295
def instance_endpoint(self):

codepost/util/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
_LOG_SCOPE = "{}".format(__name__)
7272

7373
SETTINGS_URL = "https://codepost.io/settings"
74-
BASE_URL = "https://api.codepost.io/"
74+
BASE_URL = "https://api.codepost.io"
7575
DEFAULT_API_KEY_ENV = "CP_API_KEY"
7676
DEFAULT_CONFIG_PATHS = [
7777
"codepost-config.yaml",

0 commit comments

Comments
 (0)