Open olika-ashley opened 3 months ago
Refactor our current API endpoint for updating a blog entry by its ID to have the following route, request body, and response body.
PUT /api/v1/blogs/{id}
`
{ "title": "string", "content": "string", "category": "Startup", "image_url": "string" } ` ### Response Body Status 200 ok ` { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "title": "string", "image_url": "string", "content": "string", "published_date": "2024-08-24T17:25:23.572Z", "updated_date": "2024-08-24T17:25:23.572Z", "author_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "category": "Startup", "comments": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "content": "string", "created_at": "2024-08-24T17:25:23.573Z" } ] }
Status code 404
{ "data": "string", "error": "string", "message": "string", "status_code": 0 }
Description
Refactor our current API endpoint for updating a blog entry by its ID to have the following route, request body, and response body.
Route
PUT /api/v1/blogs/{id}
Request Body
`
Status code 404
Expected Outcome