feat: lock concurrent moderation decisions
This commit is contained in:
+67
-5
@@ -147,6 +147,10 @@
|
||||
"title": "Moderation Status",
|
||||
"type": "string"
|
||||
},
|
||||
"moderation_version": {
|
||||
"title": "Moderation Version",
|
||||
"type": "integer"
|
||||
},
|
||||
"player_name": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -194,7 +198,8 @@
|
||||
"reported_at",
|
||||
"moderation_status",
|
||||
"comment",
|
||||
"screenshot_url"
|
||||
"screenshot_url",
|
||||
"moderation_version"
|
||||
],
|
||||
"title": "AdminCatchReportOut",
|
||||
"type": "object"
|
||||
@@ -643,8 +648,27 @@
|
||||
"title": "ExternalAliasSuggestionOut",
|
||||
"type": "object"
|
||||
},
|
||||
"ExternalObservationAction": {
|
||||
"properties": {
|
||||
"expected_version": {
|
||||
"minimum": 0.0,
|
||||
"title": "Expected Version",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"expected_version"
|
||||
],
|
||||
"title": "ExternalObservationAction",
|
||||
"type": "object"
|
||||
},
|
||||
"ExternalObservationDecision": {
|
||||
"properties": {
|
||||
"expected_version": {
|
||||
"minimum": 0.0,
|
||||
"title": "Expected Version",
|
||||
"type": "integer"
|
||||
},
|
||||
"reason": {
|
||||
"maxLength": 1000,
|
||||
"minLength": 1,
|
||||
@@ -653,13 +677,19 @@
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"reason"
|
||||
"reason",
|
||||
"expected_version"
|
||||
],
|
||||
"title": "ExternalObservationDecision",
|
||||
"type": "object"
|
||||
},
|
||||
"ExternalObservationMapping": {
|
||||
"properties": {
|
||||
"expected_version": {
|
||||
"minimum": 0.0,
|
||||
"title": "Expected Version",
|
||||
"type": "integer"
|
||||
},
|
||||
"fish_slug": {
|
||||
"title": "Fish Slug",
|
||||
"type": "string"
|
||||
@@ -683,7 +713,8 @@
|
||||
},
|
||||
"required": [
|
||||
"fish_slug",
|
||||
"waterbody_slug"
|
||||
"waterbody_slug",
|
||||
"expected_version"
|
||||
],
|
||||
"title": "ExternalObservationMapping",
|
||||
"type": "object"
|
||||
@@ -750,6 +781,10 @@
|
||||
"title": "Missing Fields",
|
||||
"type": "array"
|
||||
},
|
||||
"moderation_version": {
|
||||
"title": "Moderation Version",
|
||||
"type": "integer"
|
||||
},
|
||||
"published_at": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -906,7 +941,8 @@
|
||||
"catch_report_id",
|
||||
"review_note",
|
||||
"missing_fields",
|
||||
"source_payload"
|
||||
"source_payload",
|
||||
"moderation_version"
|
||||
],
|
||||
"title": "ExternalObservationOut",
|
||||
"type": "object"
|
||||
@@ -1189,6 +1225,11 @@
|
||||
},
|
||||
"ModerationUpdate": {
|
||||
"properties": {
|
||||
"expected_version": {
|
||||
"minimum": 0.0,
|
||||
"title": "Expected Version",
|
||||
"type": "integer"
|
||||
},
|
||||
"reason": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -1207,7 +1248,8 @@
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"status"
|
||||
"status",
|
||||
"expected_version"
|
||||
],
|
||||
"title": "ModerationUpdate",
|
||||
"type": "object"
|
||||
@@ -1897,6 +1939,16 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "expected_version",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"minimum": 0,
|
||||
"title": "Expected Version",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "header",
|
||||
"name": "authorization",
|
||||
@@ -2353,6 +2405,16 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ExternalObservationAction"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
|
||||
Reference in New Issue
Block a user