diff --git a/src/http.ts b/src/http.ts index b8a227a..8f0b8e0 100644 --- a/src/http.ts +++ b/src/http.ts @@ -162,7 +162,7 @@ export class LemmyHttp { headers?: { [key: string]: string }; } ) { - this.#apiUrl = `${baseUrl}/api/${VERSION}`; + this.#apiUrl = `${baseUrl.replace(/\/+$/, "")}/api/${VERSION}`; this.#pictrsUrl = `${baseUrl}/pictrs/image`; if (options?.headers) {