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

userByUsername #6

Closed owiegand closed 6 years ago

owiegand commented 6 years ago

getUserByUsername: Receives

username,
friend_username,
token

returns

success: true/false, 
first_name,
last_name,
friend_status: friend/pending/stranger
friend_date
owiegand commented 6 years ago

For cases that username is not found in the DB. This JSON string will be returned:

{
   "success":false,
   "debug":"Username not found"
}

For cases where the username is found. This JSON string will be returned:

{  
   "success":true,
   "first_name":"name",
   "last_name":"",
   "friend_status":"friend",
   "friend_date":"March 10, 2001, 5:16 pm"
}

The friend_date field will contain the time in UTC that the last action between these two users was taken. Time will added upon request, and updated when the friendship is accepted. This field can return NULL if there isn't a date. This only occurs when the user's are strangers.

owiegand commented 6 years ago

@nathantspencer This code is ready to go. Finished in commit 28e0568ee3be972d15aa7f0496d608bd9b2b6099

owiegand commented 6 years ago

I'm actually going to leave this open until friend_status is finished.

owiegand commented 6 years ago

Finished this code in b1244e899b4bd03d1b5be91edf2e04c294b0e120