diff --git a/src/http.ts b/src/http.ts index fe482f0..b39e983 100644 --- a/src/http.ts +++ b/src/http.ts @@ -1409,7 +1409,7 @@ export class LemmyHttp { /** * Delete a pictrs image */ - async deleteImage({ token, filename }: DeleteImage): Promise { + async deleteImage({ token, filename }: DeleteImage): Promise { const deleteUrl = `${this.#pictrsUrl}/delete/${token}/${filename}`; const response = await this.#fetchFunction(deleteUrl, { @@ -1417,7 +1417,7 @@ export class LemmyHttp { headers: this.#headers, }); - return await response.json(); + return (await response.status) == 204; } #buildFullUrl(endpoint: string) {