mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-12-22 19:01:27 +00:00
Properly handle pictrs delete image response (#214)
This commit is contained in:
parent
73e172cb2d
commit
8f4860c01b
1 changed files with 2 additions and 2 deletions
|
@ -1409,7 +1409,7 @@ export class LemmyHttp {
|
|||
/**
|
||||
* Delete a pictrs image
|
||||
*/
|
||||
async deleteImage({ token, filename }: DeleteImage): Promise<any> {
|
||||
async deleteImage({ token, filename }: DeleteImage): Promise<boolean> {
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue