Skip to content

Report Backend Integration #7

Description

@nayan458

Integrate the frontend with the post report API.

Expected values

{
  "targetType": POST | COMMENT,  
  "targetId": "665f1df013ad4e18f6a11244",
  "reason": "MISINFORMATION",
  "details": "The description attributes the inscription to the wrong dynasty."
}

Response:

status: $$200$$

{
  "message": "Report submitted for AI moderation",
  "http-status": "ACCEPTED",
  "data": {
    "eventId": "7f8b7d33-16f2-4e84-9f54-8085a9e84791",
    "targetId": "665f1df013ad4e18f6a11244",
    "targetType": "POST",
    "status": "QUEUED"
  }
}

status: $$400$$

{
  "error_message": "Invalid or missing authorization token",
  "http_status": "UNAUTHORIZED",
  "http_status_code": 401
}

status: $$401$$

{
  "error_message": "Invalid or missing authorization token",
  "http_status": "UNAUTHORIZED",
  "http_status_code": 401
}

status: $$403$$

{
  "error_message": "Invalid or missing authorization token",
  "http_status": "UNAUTHORIZED",
  "http_status_code": 401
}

status: $$422$$

{
  "error_message": "Invalid or missing authorization token",
  "http_status": "UNAUTHORIZED",
  "http_status_code": 401
}

status: $$500$$

{
  "error_message": "Invalid or missing authorization token",
  "http_status": "UNAUTHORIZED",
  "http_status_code": 401
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions