alexandrite icon indicating copy to clipboard operation
alexandrite copied to clipboard

Feature Request: unban button in modlog if person viewing log is a moderator/admin

Open jonsjava opened this issue 1 year ago • 0 comments

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
}'

jonsjava avatar Feb 22 '24 20:02 jonsjava