Skip to content

Commit 8864c0f

Browse files
committed
(fix) double slash in path
1 parent 184e612 commit 8864c0f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/cli/lib/client.js.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const os = require('os');
2+
const join = require('path').join;
23
const https = require("https");
34
const { fetch, FormData, Agent } = require("undici");
45
const JSONbig = require("json-bigint")({ storeAsString: false });
@@ -96,7 +97,7 @@ class Client {
9697

9798
async call(method, path = "", headers = {}, params = {}, responseType = "json") {
9899
headers = {...this.headers, ...headers};
99-
const url = new URL(this.endpoint + path);
100+
const url = new URL(join(this.endpoint + path));
100101

101102
let body = undefined;
102103

0 commit comments

Comments
 (0)