fix(xen-api/{get,put}Resource): correctly fetch host
Introduced by ea10df8a9
This commit is contained in:
@@ -27,3 +27,6 @@
|
||||
> - major: if the change breaks compatibility
|
||||
>
|
||||
> In case of conflict, the highest (lowest in previous list) `$version` wins.
|
||||
|
||||
- xen-api patch
|
||||
- xo-server patch
|
||||
|
||||
@@ -371,7 +371,7 @@ export class Xapi extends EventEmitter {
|
||||
|
||||
let url = new URL('http://localhost')
|
||||
url.protocol = this._url.protocol
|
||||
url.hostname = await this._getHostAddress(await this.getRecord('host', host ?? this._pool.master))
|
||||
url.hostname = await this._getHostAddress(host ?? (await this.getRecord('host', this._pool.master)))
|
||||
url.pathname = pathname
|
||||
url.search = new URLSearchParams(query)
|
||||
|
||||
@@ -446,7 +446,7 @@ export class Xapi extends EventEmitter {
|
||||
|
||||
const url = new URL('http://localhost')
|
||||
url.protocol = this._url.protocol
|
||||
url.hostname = await this._getHostAddress(await this.getRecord('host', host ?? this._pool.master))
|
||||
url.hostname = await this._getHostAddress(host ?? (await this.getRecord('host', this._pool.master)))
|
||||
url.pathname = pathname
|
||||
url.search = new URLSearchParams(query)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user