Refactor API response structure to include success status and body for all endpoints, ensuring consistent response format across the application.
Some checks failed
platform/bro-js/challenge-pl/pipeline/head There was a failure building this commit
Some checks failed
platform/bro-js/challenge-pl/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -1,43 +1,46 @@
|
||||
{
|
||||
"user-frontend-001": [
|
||||
{
|
||||
"_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
|
||||
},
|
||||
{
|
||||
"_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
|
||||
},
|
||||
{
|
||||
"_id": "submission-003",
|
||||
"id": "submission-003",
|
||||
"user": "user-frontend-001",
|
||||
"task": "task-react-component",
|
||||
"result": "export const StatCard = () => null;",
|
||||
"status": "pending",
|
||||
"queueId": "queue-frontend-003",
|
||||
"feedback": null,
|
||||
"submittedAt": "2024-10-19T09:05:00.000Z",
|
||||
"checkedAt": null,
|
||||
"attemptNumber": 1
|
||||
}
|
||||
]
|
||||
"success": true,
|
||||
"body": {
|
||||
"user-frontend-001": [
|
||||
{
|
||||
"_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
|
||||
},
|
||||
{
|
||||
"_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
|
||||
},
|
||||
{
|
||||
"_id": "submission-003",
|
||||
"id": "submission-003",
|
||||
"user": "user-frontend-001",
|
||||
"task": "task-react-component",
|
||||
"result": "export const StatCard = () => null;",
|
||||
"status": "pending",
|
||||
"queueId": "queue-frontend-003",
|
||||
"feedback": null,
|
||||
"submittedAt": "2024-10-19T09:05:00.000Z",
|
||||
"checkedAt": null,
|
||||
"attemptNumber": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user