Delete
/api/v2/post/delete
Post
posts
jwt
Purpose
To allow a user to delete an existing post.
Body Content [input]
{
uid: string,
postID: string
}
Returns if valid [output]
{
message: string,
error: 0
}
What the API does
- Ensures that a post with the supplied
postID
exists [404]. - Ensures that the
uid
passed corresponds to that of the found post [403]. - Removes the
post
being referenced from theposts
collection.