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 @@
|
||||
{
|
||||
"user-frontend-001": {
|
||||
"totalTasksAttempted": 2,
|
||||
"completedTasks": 1,
|
||||
"inProgressTasks": 1,
|
||||
"needsRevisionTasks": 0,
|
||||
"totalSubmissions": 3,
|
||||
"averageCheckTimeMs": 4200,
|
||||
"taskStats": [
|
||||
{
|
||||
"taskId": "task-html-intro",
|
||||
"taskTitle": "HTML старт",
|
||||
"attempts": [
|
||||
{
|
||||
"attemptNumber": 1,
|
||||
"status": "needs_revision",
|
||||
"submittedAt": "2024-10-18T07:10:00.000Z",
|
||||
"checkedAt": "2024-10-18T07:10:15.000Z",
|
||||
"feedback": "Добавьте тег <title>."
|
||||
},
|
||||
{
|
||||
"attemptNumber": 2,
|
||||
"status": "accepted",
|
||||
"submittedAt": "2024-10-18T07:20:00.000Z",
|
||||
"checkedAt": "2024-10-18T07:20:05.000Z",
|
||||
"feedback": "Отличная работа!"
|
||||
}
|
||||
],
|
||||
"totalAttempts": 2,
|
||||
"status": "completed",
|
||||
"lastAttemptAt": "2024-10-18T07:20:00.000Z"
|
||||
},
|
||||
{
|
||||
"taskId": "task-react-component",
|
||||
"taskTitle": "React компонент",
|
||||
"attempts": [
|
||||
{
|
||||
"attemptNumber": 1,
|
||||
"status": "pending",
|
||||
"submittedAt": "2024-10-19T09:05:00.000Z",
|
||||
"feedback": null
|
||||
}
|
||||
],
|
||||
"totalAttempts": 1,
|
||||
"status": "pending",
|
||||
"lastAttemptAt": "2024-10-19T09:05:00.000Z"
|
||||
}
|
||||
],
|
||||
"chainStats": [
|
||||
{
|
||||
"chainId": "chain-frontend",
|
||||
"chainName": "Frontend Basics",
|
||||
"totalTasks": 2,
|
||||
"completedTasks": 1,
|
||||
"progress": 50
|
||||
}
|
||||
]
|
||||
"success": true,
|
||||
"body": {
|
||||
"user-frontend-001": {
|
||||
"totalTasksAttempted": 2,
|
||||
"completedTasks": 1,
|
||||
"inProgressTasks": 1,
|
||||
"needsRevisionTasks": 0,
|
||||
"totalSubmissions": 3,
|
||||
"averageCheckTimeMs": 4200,
|
||||
"taskStats": [
|
||||
{
|
||||
"taskId": "task-html-intro",
|
||||
"taskTitle": "HTML старт",
|
||||
"attempts": [
|
||||
{
|
||||
"attemptNumber": 1,
|
||||
"status": "needs_revision",
|
||||
"submittedAt": "2024-10-18T07:10:00.000Z",
|
||||
"checkedAt": "2024-10-18T07:10:15.000Z",
|
||||
"feedback": "Добавьте тег <title>."
|
||||
},
|
||||
{
|
||||
"attemptNumber": 2,
|
||||
"status": "accepted",
|
||||
"submittedAt": "2024-10-18T07:20:00.000Z",
|
||||
"checkedAt": "2024-10-18T07:20:05.000Z",
|
||||
"feedback": "Отличная работа!"
|
||||
}
|
||||
],
|
||||
"totalAttempts": 2,
|
||||
"status": "completed",
|
||||
"lastAttemptAt": "2024-10-18T07:20:00.000Z"
|
||||
},
|
||||
{
|
||||
"taskId": "task-react-component",
|
||||
"taskTitle": "React компонент",
|
||||
"attempts": [
|
||||
{
|
||||
"attemptNumber": 1,
|
||||
"status": "pending",
|
||||
"submittedAt": "2024-10-19T09:05:00.000Z",
|
||||
"feedback": null
|
||||
}
|
||||
],
|
||||
"totalAttempts": 1,
|
||||
"status": "pending",
|
||||
"lastAttemptAt": "2024-10-19T09:05:00.000Z"
|
||||
}
|
||||
],
|
||||
"chainStats": [
|
||||
{
|
||||
"chainId": "chain-frontend",
|
||||
"chainName": "Frontend Basics",
|
||||
"totalTasks": 2,
|
||||
"completedTasks": 1,
|
||||
"progress": 50
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user