mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-02-04 08:11:42 +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({
|
const imagesRes = await api.listAllMedia({
|
||||||
limit: imageFetchLimit,
|
limit: imageFetchLimit,
|
||||||
});
|
});
|
||||||
Promise.all(
|
const forms = imagesRes.images.map(image => {
|
||||||
imagesRes.images
|
|
||||||
.map(image => {
|
|
||||||
const form: DeleteImageParams = {
|
const form: DeleteImageParams = {
|
||||||
token: image.local_image.pictrs_delete_token,
|
token: image.local_image.pictrs_delete_token,
|
||||||
filename: image.local_image.pictrs_alias,
|
filename: image.local_image.pictrs_alias,
|
||||||
};
|
};
|
||||||
console.log("delete image: " + form);
|
|
||||||
return form;
|
return form;
|
||||||
})
|
});
|
||||||
.map(form => api.deleteImage(form)),
|
for (const form of forms) {
|
||||||
|
console.log(
|
||||||
|
"delete image: token=" + form.token + ", name=" + form.filename,
|
||||||
);
|
);
|
||||||
|
await api.deleteImage(form);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function unfollows() {
|
export async function unfollows() {
|
||||||
|
|
Loading…
Reference in a new issue