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,59 +1,62 @@
|
||||
[
|
||||
{
|
||||
"_id": "submission-001",
|
||||
"id": "submission-001",
|
||||
"user": {
|
||||
"id": "user-frontend-001",
|
||||
"nickname": "frontend_ninja"
|
||||
{
|
||||
"success": true,
|
||||
"body": [
|
||||
{
|
||||
"_id": "submission-001",
|
||||
"id": "submission-001",
|
||||
"user": {
|
||||
"id": "user-frontend-001",
|
||||
"nickname": "frontend_ninja"
|
||||
},
|
||||
"task": {
|
||||
"id": "task-html-intro",
|
||||
"title": "HTML старт"
|
||||
},
|
||||
"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
|
||||
},
|
||||
"task": {
|
||||
"id": "task-html-intro",
|
||||
"title": "HTML старт"
|
||||
{
|
||||
"_id": "submission-002",
|
||||
"id": "submission-002",
|
||||
"user": {
|
||||
"id": "user-frontend-001",
|
||||
"nickname": "frontend_ninja"
|
||||
},
|
||||
"task": {
|
||||
"id": "task-html-intro",
|
||||
"title": "HTML старт"
|
||||
},
|
||||
"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
|
||||
},
|
||||
"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": {
|
||||
"id": "user-frontend-001",
|
||||
"nickname": "frontend_ninja"
|
||||
},
|
||||
"task": {
|
||||
"id": "task-html-intro",
|
||||
"title": "HTML старт"
|
||||
},
|
||||
"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-004",
|
||||
"id": "submission-004",
|
||||
"user": {
|
||||
"id": "user-react-777",
|
||||
"nickname": "react_master"
|
||||
},
|
||||
"task": {
|
||||
"id": "task-react-component",
|
||||
"title": "React компонент"
|
||||
},
|
||||
"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
|
||||
}
|
||||
]
|
||||
{
|
||||
"_id": "submission-004",
|
||||
"id": "submission-004",
|
||||
"user": {
|
||||
"id": "user-react-777",
|
||||
"nickname": "react_master"
|
||||
},
|
||||
"task": {
|
||||
"id": "task-react-component",
|
||||
"title": "React компонент"
|
||||
},
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user