feat: add moderation decision history

This commit is contained in:
ik
2026-09-12 21:52:25 +07:00
parent 9681bdbd36
commit fcc26a5b34
6 changed files with 179 additions and 7 deletions
+132 -5
View File
@@ -199,6 +199,65 @@
"title": "AdminCatchReportOut",
"type": "object"
},
"AdminModerationHistoryOut": {
"properties": {
"action": {
"title": "Action",
"type": "string"
},
"decided_at": {
"format": "date-time",
"title": "Decided At",
"type": "string"
},
"entity_id": {
"format": "uuid",
"title": "Entity Id",
"type": "string"
},
"entity_type": {
"title": "Entity Type",
"type": "string"
},
"moderator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Moderator"
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reason"
},
"requires_confirmation": {
"default": true,
"title": "Requires Confirmation",
"type": "boolean"
}
},
"required": [
"entity_type",
"entity_id",
"decided_at",
"action",
"moderator",
"reason"
],
"title": "AdminModerationHistoryOut",
"type": "object"
},
"BaitOut": {
"properties": {
"id": {
@@ -565,11 +624,6 @@
],
"title": "Fish Slug"
},
"requires_confirmation": {
"default": true,
"title": "Requires Confirmation",
"type": "boolean"
},
"waterbody_slug": {
"anyOf": [
{
@@ -2509,6 +2563,79 @@
"summary": "Admin Start Official Import"
}
},
"/api/v1/admin/moderation-history": {
"get": {
"operationId": "admin_moderation_history_api_v1_admin_moderation_history_get",
"parameters": [
{
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 50,
"maximum": 200,
"minimum": 1,
"title": "Limit",
"type": "integer"
}
},
{
"in": "query",
"name": "offset",
"required": false,
"schema": {
"default": 0,
"minimum": 0,
"title": "Offset",
"type": "integer"
}
},
{
"in": "header",
"name": "authorization",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/AdminModerationHistoryOut"
},
"title": "Response Admin Moderation History Api V1 Admin Moderation History Get",
"type": "array"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Admin Moderation History"
}
},
"/api/v1/baits": {
"get": {
"operationId": "baits_api_v1_baits_get",