Skip to content

Commit

Permalink
fix: makeRequest base URL logic (#1273)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjolton-contentful committed Dec 8, 2023
2 parents 7e3b348 + ddb1eeb commit 2ae3bdc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/bin/cli.ts
Expand Up @@ -65,7 +65,14 @@ export const createMakeRequest = (
})

const makeBaseUrl = (url: string) => {
const parts = ['spaces', spaceId, 'environments', environmentId, trim(url, '/')]
const parts = [
'https://api.contentful.com',
'spaces',
spaceId,
'environments',
environmentId,
trim(url, '/')
]

return parts.filter((x) => x !== '').join('/')
}
Expand Down

0 comments on commit 2ae3bdc

Please sign in to comment.