Skip to content

refactor: derive v2 API host from baseUrl in resolveUrl#49

Merged
iamsamuelfraga merged 1 commit into
mainfrom
refactor/resolve-url-host
Jun 28, 2026
Merged

refactor: derive v2 API host from baseUrl in resolveUrl#49
iamsamuelfraga merged 1 commit into
mainfrom
refactor/resolve-url-host

Conversation

@iamsamuelfraga

Copy link
Copy Markdown
Collaborator

Addresses the review nit from #34: resolveUrl hardcoded https://api.pipedrive.com for v2 endpoints instead of deriving it from baseUrl. Now strips the trailing /v1 so v1 and v2 share the same host (future-proof if baseUrl ever becomes a company domain). Behaviour is identical for the current default host.

Build ✅ · lint ✅ · tests ✅ (no regression in v2 endpoint tests).

resolveUrl hardcoded https://api.pipedrive.com for /api/v2/ endpoints,
duplicating the host from baseUrl. Derive it by stripping the trailing
/v1 so v1 and v2 always share the same host, even if baseUrl is ever
pointed at a company-specific domain.
@iamsamuelfraga
iamsamuelfraga merged commit d678078 into main Jun 28, 2026
2 checks passed
@iamsamuelfraga
iamsamuelfraga deleted the refactor/resolve-url-host branch June 28, 2026 14:20
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant