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,27 +1,30 @@
|
||||
[
|
||||
{
|
||||
"id": "chain-frontend",
|
||||
"_id": "chain-frontend",
|
||||
"name": "Frontend Basics",
|
||||
"createdAt": "2024-09-01T08:00:00.000Z",
|
||||
"updatedAt": "2024-10-12T10:15:00.000Z",
|
||||
"tasks": [
|
||||
{
|
||||
"id": "task-html-intro",
|
||||
"_id": "task-html-intro",
|
||||
"title": "HTML старт",
|
||||
"description": "# HTML старт\n\nСоздайте базовую HTML-страницу с заголовком и абзацем.",
|
||||
"createdAt": "2024-09-01T08:05:00.000Z",
|
||||
"updatedAt": "2024-09-10T12:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "task-react-component",
|
||||
"_id": "task-react-component",
|
||||
"title": "React компонент",
|
||||
"description": "# React компонент\n\nСоздайте компонент `StatCard` с пропсами `title` и `value`.",
|
||||
"createdAt": "2024-09-05T11:30:00.000Z",
|
||||
"updatedAt": "2024-10-01T09:45:00.000Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
"success": true,
|
||||
"body": [
|
||||
{
|
||||
"id": "chain-frontend",
|
||||
"_id": "chain-frontend",
|
||||
"name": "Frontend Basics",
|
||||
"createdAt": "2024-09-01T08:00:00.000Z",
|
||||
"updatedAt": "2024-10-12T10:15:00.000Z",
|
||||
"tasks": [
|
||||
{
|
||||
"id": "task-html-intro",
|
||||
"_id": "task-html-intro",
|
||||
"title": "HTML старт",
|
||||
"description": "# HTML старт\n\nСоздайте базовую HTML-страницу с заголовком и абзацем.",
|
||||
"createdAt": "2024-09-01T08:05:00.000Z",
|
||||
"updatedAt": "2024-09-10T12:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "task-react-component",
|
||||
"_id": "task-react-component",
|
||||
"title": "React компонент",
|
||||
"description": "# React компонент\n\nСоздайте компонент `StatCard` с пропсами `title` и `value`.",
|
||||
"createdAt": "2024-09-05T11:30:00.000Z",
|
||||
"updatedAt": "2024-10-01T09:45:00.000Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user