diff --git a/api/db/helpers.py b/api/db/helpers.py new file mode 100644 index 0000000..ea0319e --- /dev/null +++ b/api/db/helpers.py @@ -0,0 +1,12 @@ +import os + +def find_project_root(): + current_path = os.getcwd() + while not os.path.isfile(os.path.join(current_path, 'LICENSE')): + current_path = os.path.dirname(current_path) + return current_path + +root = find_project_root() + +if __name__ == '__main__': + print(find_project_root()) \ No newline at end of file diff --git a/api/db/users.py b/api/db/users.py index 6029ce2..691da68 100644 --- a/api/db/users.py +++ b/api/db/users.py @@ -22,16 +22,6 @@ with open(os.path.join(helpers.root, 'api', 'config', 'config.yml'), encoding='u class UserManager: """ Manager of all users in the database. - Following methods are available: - - - `_get_collection(collection_name)` - - `create(discord_id)` - - `user_by_id(user_id)` - - `user_by_discord_id(discord_id)` - - `user_by_api_key(api_key)` - - `update_by_id(user_id, new_obj)` - - `update_by_filter(filter_object, new_obj)` - - `delete(user_id)` """ def __init__(self):