aboutsummaryrefslogtreecommitdiff
path: root/scripts/users/handle_users.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/users/handle_users.py')
-rw-r--r--scripts/users/handle_users.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/users/handle_users.py b/scripts/users/handle_users.py
index 7a315f1..e2fb7af 100644
--- a/scripts/users/handle_users.py
+++ b/scripts/users/handle_users.py
@@ -3,11 +3,12 @@ mongo_collection = mongo_database.get_collection("users")
def user_exists(user):
try:
- res = mongo_collection.find_one({"name": user}, {"password": 1})
+ res = mongo_collection.find_one({"name": user}, {"password": 1, "isAiSubscriber": 1})
if res is None:
return {"success": True, "user": None}
else:
- return {"success": True, "user": user, "password": res["password"]}
+ # Fix this - there is a better way
+ return {"success": True, "user": user, "password": res["password"], "isAiSubscriber": res["isAiSubscriber"]}
except:
return {"success": False, "error": "Request error, try again"}