Skip to content

Commit

Permalink
feat: disabled authentication!
Browse files Browse the repository at this point in the history
  • Loading branch information
amindadgar committed Sep 16, 2024
1 parent ae80bdd commit b34a51d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
42 changes: 21 additions & 21 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion utils/process_guild_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit b34a51d

Please sign in to comment.