X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b863f7aaab7112a32c7f9b1e7a0299c4266df2f5..180c2c37b635cbb7a33257d2ee9b4395553ce5e7:/src/common/api/url-builder.ts diff --git a/src/common/api/url-builder.ts b/src/common/api/url-builder.ts index e5786a23..0587c837 100644 --- a/src/common/api/url-builder.ts +++ b/src/common/api/url-builder.ts @@ -2,25 +2,25 @@ // // SPDX-License-Identifier: AGPL-3.0 -export default class UrlBuilder { - private url: string = ""; - private query: string = ""; +export class UrlBuilder { + private readonly url: string = ""; + private query: string = ""; - constructor(host: string) { - this.url = host; - } + constructor(host: string) { + this.url = host; + } - public addParam(param: string, value: string) { - if (this.query.length === 0) { - this.query += "?"; - } else { - this.query += "&"; - } - this.query += `${param}=${value}`; - return this; - } + public addParam(param: string, value: string) { + if (this.query.length === 0) { + this.query += "?"; + } else { + this.query += "&"; + } + this.query += `${param}=${value}`; + return this; + } - public get() { - return this.url + this.query; - } + public get() { + return this.url + this.query; + } }