Skip to content

Commit

Permalink
Merge pull request #12 from TogetherCrew/feat/10-platform-agnostic-data
Browse files Browse the repository at this point in the history
feat: disabled authentication!
  • Loading branch information
amindadgar authored Sep 16, 2024
2 parents efc392e + b34a51d commit a69eb9e
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
@@ -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
@@ -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"]

0 comments on commit a69eb9e

Please sign in to comment.