Skip to content

Added the possiblility for mass-deletion of posts via CLI - #694

Open
Anbosuki wants to merge 1 commit into
rr-:masterfrom
Anbosuki:cli-mass-delete
Open

Added the possiblility for mass-deletion of posts via CLI#694
Anbosuki wants to merge 1 commit into
rr-:masterfrom
Anbosuki:cli-mass-delete

Conversation

@Anbosuki

Copy link
Copy Markdown

Hello,
I created a script in the past that allows the user to mass delete posts after their ID. This script is more or less useful if you want to delete a large amount of posts and don't want to use the delete function on the post overview, which would require you to select each post manually.

The command can be executed with the admin command: docker-compose run server ./szuru-admin --delete-posts

You can then either pass a range of ID's like 40-50 or individual ID's like 35. Passing values like 50-40 is handled by simply switching them.

I tested it on a test instance and also on my own live instance and it works.
However there is one problem. After running the script the posts are still shown on the page. Even after a hard reload they are still visible. If you click on them you get an error. The only fix for me was to either clear the cookies or to logout -> login again. For private instances that might be just fine, but if you use it with more people that can be annoying. If anyone has a suggestion on how to fix this, please tell me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant