AtLAS-WVU / AtLAS-server

An open-source server application for dispatching, receiving, and tracking AtLAS (Autonomous Low Altitude Service) delivery drones.
https://deliverwithatlas.com/
GNU General Public License v3.0
1 stars 2 forks source link

confirmFriend #11

Closed owiegand closed 6 years ago

owiegand commented 6 years ago

POST Request: receives: username, friend_username, token returns: success

owiegand commented 6 years ago

Finished this code in the 2e5f34c457da77f03e5a0cfc1cd24823031fc9f3 commit.

The code expects the following parameters via POST:

username
friend_username
token
owiegand commented 6 years ago

When there is an error and we don't want to change any rows the following response is generated:

{
   "success":false,
   "debug":"No Rows Affected"
}

The other debug messages that can be expected during a failure are:

A username must be entered!
A friends username must be entered!
An token must be entered!
User token doesn't match
And other messages relating to mysql connections failing

In the case of the successful confirmation of friendship the following response is generated:

{
   "success":true,
}