Method for getting followers of an account

This commit is contained in:
Socks 2018-03-28 01:58:47 +01:00
parent 9824eab7f0
commit 81d09f60e6

View file

@ -52,6 +52,12 @@ def update_profile(username, details):
{'$set': {'profile': details}}, upsert=True)
def get_followers(username):
if not account_exists(username):
return False
return accounts_db.find({"following": account_details(username)['_id']})
def validate_username(username):
allowed_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890_"
for char in username: