# Action
Here are admin routes for user ban and block domain
# Get All Banned Users
# Resource URL
https://humtog.com/api/admin/banned-users
# Resource Method
GET
# Example Response
{
"data": [
{
"id": 2,
"channel_name": "channelName",
"description": null,
"user_id": "2",
"unban_at": "2020-05-24 16:59:14",
"created_at": "2020-05-22 16:59:14",
"user": {
"id": 2,
"username": "userName",
"name": "fullName",
"bio": null,
"avatar": "/imgs/default-avatar.png",
"verified_email": true,
...
}
},
...
]
}
# Ban User
# Resource URL
https://humtog.com/api/admin/banned-users
# Resource Method
POST
# Params
| Name | Required | Type | Description |
|---|---|---|---|
user_id | Yes | integer | User Id |
duration | Yes | integer | In days, int 0-999, required. If set to 0 user will be banned for 17 years |
description | No | string | Short description why is user baned. Max 5000 characters |
delete_posts | No | boolean | Delete all post from this user? |
# Example Response
{
"data": [
{
"id": 2,
"channel_name": "channelName",
"description": null,
"user_id": "2",
"unban_at": "2020-05-24 16:59:14",
"created_at": "2020-05-22 16:59:14",
"user": {
"id": 2,
"username": "userName",
"name": "fullName",
"bio": null,
"avatar": "/imgs/default-avatar.png",
"verified_email": true,
...
}
},
...
]
}
# Un-ban User
# Resource URL
https://humtog.com/api/admin/banned-users/:user_id
# Resource Method
DELETE
# Example Response
{
"message": "User unbanned successfully."
}
# List Blocked Domains
# Resource URL
https://humtog.com/api/admin/blocked-domains
# Resource Method
GET
# Example Response
{
"data": {
"id": 1,
"channel_name": "channelName",
"description": null,
"domain": "example.com",
"created_at": "2020-05-22 16:53:20"
}
}
# Block Domain
# Resource URL
https://humtog.com/api/admin/blocked-domains
# Resource Method
POST
# Params
| Name | Required | Type | Description |
|---|---|---|---|
domain | Yes | integer | Full domain url |
description | No | string | Short description why domain is blocked. Max 5000 characters |
# Example Response
{
"data": {
"id": 1,
"channel_name": "channelName",
"description": null,
"domain": "example.com",
"created_at": "2020-05-22 16:53:20"
}
}
# Un-block Domain
# Resource URL
https://humtog.com/api/admin/blocked-domains/:domain_name
# Resource Method
DELETE
# Example Response
{
"message": "example.com is no longer blacklisted at #channelName. "
}
← Comment CRUD Methods →