aboutsummaryrefslogtreecommitdiff
path: root/api/social/request_list.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/social/request_list.py')
-rw-r--r--api/social/request_list.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/social/request_list.py b/api/social/request_list.py
index a2b23d5..624b3b4 100644
--- a/api/social/request_list.py
+++ b/api/social/request_list.py
@@ -9,9 +9,11 @@ requests = Blueprint('requests', __name__)
@requests.route("/requests")
@auth_required("user")
def route(user_2_id):
+ # get a list of friend requests
request_list = cursor.execute("select user_1_id from social where user_2_id = ? and type = \"outgoing\"",
[user_2_id]).fetchall()
+ # get user_id for each result to prevent repeat user/info requests
formatted_request_list = []
for user_1_id in [q[0] for q in request_list]:
formatted_request_list.append(format_user(user_1_id))