challenge-pl/stubs/api/data/queue-status.json
Primakov Alexandr Alexandrovich cde28b1dd8
Some checks failed
platform/bro-js/challenge-pl/pipeline/head There was a failure building this commit
Refactor API response structure to include success status and body for all endpoints, ensuring consistent response format across the application.
2025-11-04 11:18:13 +03:00

61 lines
1.8 KiB
JSON

{
"success": true,
"body": {
"queue-frontend-001": {
"status": "completed",
"position": 0,
"submission": {
"_id": "submission-001",
"id": "submission-001",
"user": "user-frontend-001",
"task": "task-html-intro",
"result": "<html><head></head><body><h1>Hello</h1></body></html>",
"status": "needs_revision",
"queueId": "queue-frontend-001",
"feedback": "Добавьте тег <title>",
"submittedAt": "2024-10-18T07:10:00.000Z",
"checkedAt": "2024-10-18T07:10:15.000Z",
"attemptNumber": 1
}
},
"queue-frontend-002": {
"status": "completed",
"position": 0,
"submission": {
"_id": "submission-002",
"id": "submission-002",
"user": "user-frontend-001",
"task": "task-html-intro",
"result": "<html><head><title>Home</title></head><body><h1>Hello</h1></body></html>",
"status": "accepted",
"queueId": "queue-frontend-002",
"feedback": "Отличная работа!",
"submittedAt": "2024-10-18T07:20:00.000Z",
"checkedAt": "2024-10-18T07:20:05.000Z",
"attemptNumber": 2
}
},
"queue-frontend-003": {
"status": "waiting",
"position": 3
},
"queue-react-001": {
"status": "completed",
"position": 0,
"submission": {
"_id": "submission-004",
"id": "submission-004",
"user": "user-react-777",
"task": "task-react-component",
"result": "export const StatCard = () => <div>Stat</div>;",
"status": "accepted",
"queueId": "queue-react-001",
"feedback": "Добавьте prop-types.",
"submittedAt": "2024-10-17T11:30:00.000Z",
"checkedAt": "2024-10-17T11:30:07.000Z",
"attemptNumber": 1
}
}
}
}