Skip to content

Commit

Permalink
dynamic upload servers (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
barduinor authored Jul 2, 2024
1 parent fb10165 commit b672a6a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,23 @@ class Collection {
url (path, endpoint) {
const server = this.server(endpoint)

const strippedHost = server.host.replace(/\{|\}/g, '')

return {
protocol: 'https',
host: `{{${server.host}}}`,
host: `{{${strippedHost}}}`,
path: this.path(server, path),
query: this.query(endpoint),
variable: this.variable(endpoint)
}

// return {
// protocol: 'https',
// host: `{{${server.host}}}`,
// path: this.path(server, path),
// query: this.query(endpoint),
// variable: this.variable(endpoint)
// }
}

path (server, path) {
Expand Down

0 comments on commit b672a6a

Please sign in to comment.