From cba53cc68d485f3a567a6232352d065e8331d1cd Mon Sep 17 00:00:00 2001 From: dichi <13516063@std.stei.itb.ac.id> Date: Fri, 26 Apr 2019 15:28:30 +0700 Subject: [PATCH] changed get-user endpoint response --- modules/login.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/login.py b/modules/login.py index 77d9b8a..710e3b5 100644 --- a/modules/login.py +++ b/modules/login.py @@ -62,9 +62,14 @@ def check_user_existence(): @validate_login_token(pass_user=True) def get_user_from_token(user): del user.password + child = [child for child in user.page_list] + for x in child: + del x.subdata + return jsonify({ "status": 200, - "data": user #sends back all information about user except password + "data": user, #sends back all information about user except password + "page_list": child }) @login_route.route("/api/get-user-public", methods=["POST"]) -- GitLab