Delete
/api/v2/story/delete
Post
stories
jwt
Purpose
To allow a user to delete a story that he/she has posted.
Body Content [input]
{
uid: string,
storyID: string
}
Returns if valid [output]
{
message: string,
error: 0
}
What the API does
- Finds the
storyrecords from thestoriescollection corresponding to thestoryIDpassed. - Ensures that that
storyrecord has the same value for itsuidfield as that passed. - Checks that the current day / time minus the value of the
posted_onfield of thatstoryrecord is less than 24 hours [403]. - Deletes the record from the
storiescollection corresponding to the value of thestoryIDfield passed.