mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-11 04:25:55 +00:00
dbg
This commit is contained in:
parent
7f78275006
commit
2e7a961ecf
1 changed files with 13 additions and 12 deletions
|
@ -932,18 +932,19 @@ export async function deleteAllImages(api: LemmyHttp) {
|
|||
const imagesRes = await api.listAllMedia({
|
||||
limit: imageFetchLimit,
|
||||
});
|
||||
Promise.all(
|
||||
imagesRes.images
|
||||
.map(image => {
|
||||
const form: DeleteImageParams = {
|
||||
token: image.local_image.pictrs_delete_token,
|
||||
filename: image.local_image.pictrs_alias,
|
||||
};
|
||||
console.log("delete image: " + form);
|
||||
return form;
|
||||
})
|
||||
.map(form => api.deleteImage(form)),
|
||||
);
|
||||
const forms = imagesRes.images.map(image => {
|
||||
const form: DeleteImageParams = {
|
||||
token: image.local_image.pictrs_delete_token,
|
||||
filename: image.local_image.pictrs_alias,
|
||||
};
|
||||
return form;
|
||||
});
|
||||
for (const form of forms) {
|
||||
console.log(
|
||||
"delete image: token=" + form.token + ", name=" + form.filename,
|
||||
);
|
||||
await api.deleteImage(form);
|
||||
}
|
||||
}
|
||||
|
||||
export async function unfollows() {
|
||||
|
|
Loading…
Reference in a new issue