mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-26 06:11:14 +00:00
Merge pull request #135 from ExperiBass/trim-trailing-slash
remove trailing slashes from instance url
This commit is contained in:
commit
80bdd21eae
1 changed files with 1 additions and 1 deletions
|
@ -155,7 +155,7 @@ export class LemmyHttp {
|
|||
* @param headers optional headers. Should contain `x-real-ip` and `x-forwarded-for` .
|
||||
*/
|
||||
constructor(baseUrl: string, headers?: { [key: string]: string }) {
|
||||
this.#apiUrl = `${baseUrl}/api/${VERSION}`;
|
||||
this.#apiUrl = `${baseUrl.replace(/\/+$/, "")}/api/${VERSION}`;
|
||||
this.#pictrsUrl = `${baseUrl}/pictrs/image`;
|
||||
|
||||
if (headers) {
|
||||
|
|
Loading…
Reference in a new issue