CosmoAI commited on
Commit
f5b2f2d
·
1 Parent(s): feaff94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -44,8 +44,9 @@ def login():
44
  st.error("The email address is not valid.")
45
  password = st.text_input("Password", type="password")
46
  if st.button("Login"):
47
- if username in col.find():
48
- if password in col.find():
 
49
  st.session_state.user = username
50
  st.experimental_rerun()
51
  else:
 
44
  st.error("The email address is not valid.")
45
  password = st.text_input("Password", type="password")
46
  if st.button("Login"):
47
+ document = col.find_one({"username": username})
48
+ if document:
49
+ if password == document["password"]:
50
  st.session_state.user = username
51
  st.experimental_rerun()
52
  else: