Deactivate
/api/v2/user/deactivate
Post
users
Purpose
To allow an user to deactivate his / her account.
Body Content [input]
{
    uid: string,
    password: string,
}
Returns if valid [output]
{
    message: string,
    error: 0
}
What the API does
- Checks if there is a record in the 
userscollection with theuidsupplied [404]. - Compares the saved hashed password with a hashed version of the 
passwordsupplied to check if the password is correct [401]. - Checks if the 
deactivatedfield of the record is set tofalse[400]. - Updates and saves the record in the 
userscollection, setting thedeactivatedfield totrue.