From b34a51ddab30627b45ac93e8b287245ac6d193c3 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Mon, 16 Sep 2024 10:48:43 +0330 Subject: [PATCH] feat: disabled authentication! --- app.py | 42 ++++++++++++++++++------------------- utils/process_guild_data.py | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/app.py b/app.py index 4c7ddc9..4777e0e 100644 --- a/app.py +++ b/app.py @@ -38,24 +38,24 @@ def load_guilds_latest_date_df(): logging.basicConfig(level=logging.INFO) st.subheader("TogetherCrew's Amin Panel") -with open("config.yaml") as file: - config = yaml.load(file, Loader=SafeLoader) - -authenticator = Authenticate( - config["credentials"], - config["cookie"]["name"], - config["cookie"]["key"], - config["cookie"]["expiry_days"], - config["preauthorized"], -) -name, authentication_status, username = authenticator.login() - -if authentication_status: - authenticator.logout("Logout", "main") - st.write(f"Welcome *{name}*") - # st.title('Some content') - load_guilds_latest_date_df() -elif authentication_status is False: - st.error("Username/password is incorrect") -elif authentication_status is None: - st.warning("Please enter your username and password") +# with open("config.yaml") as file: +# config = yaml.load(file, Loader=SafeLoader) + +# authenticator = Authenticate( +# config["credentials"], +# config["cookie"]["name"], +# config["cookie"]["key"], +# config["cookie"]["expiry_days"], +# config["preauthorized"], +# ) +# name, authentication_status, username = authenticator.login() + +# if authentication_status: +# authenticator.logout("Logout", "main") +# st.write(f"Welcome *{name}*") +# # st.title('Some content') +load_guilds_latest_date_df() +# elif authentication_status is False: +# st.error("Username/password is incorrect") +# elif authentication_status is None: +# st.warning("Please enter your username and password") diff --git a/utils/process_guild_data.py b/utils/process_guild_data.py index 7e63da3..4f85e17 100644 --- a/utils/process_guild_data.py +++ b/utils/process_guild_data.py @@ -11,7 +11,7 @@ def process_guild_data( """ platform_id = str(platform_document["_id"]) guild_id = platform_document["metadata"]["id"] - utils = MongoUtils(guild_id) + utils = MongoUtils(platform_id) guild_name = platform_document["metadata"]["name"] connected_at = platform_document["connectedAt"]