📸 Social Media
Remove post image
The API endpoint allows users to remove an individual image from a social media post.
When accessing this endpoint and specifying the post ID and image ID, the image associated with the post will be removed, reducing the total number of images in the post by one.
This functionality is particularly useful when users want to manage the images included in their posts and provides them with the flexibility to delete specific images from the post.
patch/social-media/posts/remove/image/{postId}/{imageId}
Response
Remove post image
Example response
{
"data": {
"_id": "64a3e3bc9d02a1e3d365f06a",
"author": {
"_id": "64a3daef2aaac053bc597395",
"account": {
"_id": "64a3daee2aaac053bc59725b",
"avatar": {
"_id": "64a3daee2aaac053bc59725c",
"url": "https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/528.jpg"
},
"email": "rebeka.bashirian@yahoo.com",
"username": "delia_zboncak15"
},
"bio": "checkbook lover, photographer",
"countryCode": "+91",
"coverImage": {
"_id": "64a3daef2aaac053bc597394",
"url": "https://via.placeholder.com/800x450.png"
},
"createdAt": "2023-07-04T08:40:15.098Z",
"dob": "2014-10-11T03:26:22.966Z",
"firstName": "Randall",
"lastName": "Ortiz",
"location": "Port Aniyahstad, Aruba",
"owner": "64a3daee2aaac053bc59725b",
"phoneNumber": "9928906598",
"updatedAt": "2023-07-04T08:41:25.069Z"
},
"content": "Hey guys!\nI am thrilled to announce the successful execution of a stunning video for our esteemed in-house client, Dabur Amla, in honor of Father's Day. Thank you to the entire team who brought this beautiful idea to life and played a pivotal role in its execution. Your hard work and dedication have truly paid off. :raised_hands: :clap::skin-tone-2:\nDon't miss out on watching the video! Click the link below and be prepared to be moved. :star-struck:",
"createdAt": "2023-07-04T09:17:48.597Z",
"images": [
{
"_id": "64a3e3bc9d02a1e3d365f06b",
"localPath": "public/images/copper-wire168846226828285707.jpeg",
"url": "http://localhost:8080/images/copper-wire168846226828285707.jpeg"
},
{
"_id": "64a3e3bc9d02a1e3d365f06c",
"localPath": "public/images/bottle168846226828566137.jpg",
"url": "http://localhost:8080/images/bottle168846226828566137.jpg"
},
{
"_id": "64a3e3bc9d02a1e3d365f06d",
"localPath": "public/images/wood168846226851984630.jpeg",
"url": "http://localhost:8080/images/wood168846226851984630.jpeg"
}
],
"tags": [
"new",
"software",
"reactjs"
],
"updatedAt": "2023-07-04T09:21:05.201Z"
},
"message": "Post image removed successfully",
"statusCode": 200,
"success": true
}