Skip to content

Commit

Permalink
Merge pull request #42 from codepost-io/fix/trailing-slashes
Browse files Browse the repository at this point in the history
fix trailing slashes from base url and assignments class formatter
  • Loading branch information
rfreling authored Sep 29, 2023
2 parents 86dc1e5 + 8acd0bd commit f685be6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions codepost/models/abstract/api_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ def instance_endpoint_by_id(self, id=None):
pass

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

@property
def instance_endpoint(self):
Expand Down
2 changes: 1 addition & 1 deletion codepost/util/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
_LOG_SCOPE = "{}".format(__name__)

SETTINGS_URL = "https://codepost.io/settings"
BASE_URL = "https://api.codepost.io/"
BASE_URL = "https://api.codepost.io"
DEFAULT_API_KEY_ENV = "CP_API_KEY"
DEFAULT_CONFIG_PATHS = [
"codepost-config.yaml",
Expand Down
2 changes: 1 addition & 1 deletion codepost/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Version number
__version__ = "0.2.29"
__version__ = "0.3.1"

0 comments on commit f685be6

Please sign in to comment.