cURL
curl --request POST \ --url https://localhost:5000/posts/edit/{post_id} \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "caption": "<string>", "image": [ "<string>" ], "imagePublicId": [ "<string>" ] } '
{ "success": true, "message": "Post updated successfully", "data": { "_id": "<string>", "caption": "<string>", "image": "<string>", "updatedAt": "2023-11-07T05:31:56Z" } }
Edit an existing post by ID. Only the post owner can edit.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Post ID
Updated post caption
Array of new image URLs
Array of new image public IDs
Post updated successfully
true
"Post updated successfully"
Show child attributes