alexandrite
alexandrite copied to clipboard
Feature Request: unban button in modlog if person viewing log is a moderator/admin
Right now, there's no tool to unban a user that was banned by a moderator that was not from a report.
In order to do it, I came up with a simple cURL call, but I'm sure it would be easy to implement an "unban" button.
endpoint and payload to unban:
Lemmy version < 0.19.x:
# change community_id and person_id to match
curl --request POST \
--url https://lemmy.world/api/v3/community/ban_user \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'authorization: Bearer *****' \
--data '
{
"ban": false,
"community_id": 1234,
"person_id": 1234,
"auth": "JWT_TOKEN_GOES_HERE"
}'
Lemmy version >= 0.19.x:
# change community_id and person_id to match
curl --request POST \
--url https://lemmy.world/api/v3/community/ban_user \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'authorization: Bearer *****' \
--data '
{
"ban": false,
"community_id": 1234,
"person_id": 1234
}'