Delete
/api/v2/badge/delete
Post
badges
Purpose
To allow the admin to delete an existing badge.
Body Content [input]
{
secret: string,
badgeID: string
}
Returns if valid [output]
{
message: string,
error: 0
}
What the API does
- Checks if the value of the
secret
field passed is valid [401]. - Ensures that there is a
badge
in thebadges
collection corresponding to the value of thebadgeID
field passed [404]. - Removes the
badge
corresponding to the value of thebadgeID
field passed from thebadges
collection.