Updated DBHelper comments.
This commit is contained in:
parent
c82121d036
commit
cef3dc6fc0
1 changed files with 4 additions and 4 deletions
|
@ -18,7 +18,7 @@ storage = firebase.storage()
|
||||||
|
|
||||||
class DBHelper:
|
class DBHelper:
|
||||||
|
|
||||||
# Create account fuction which creates a new account.
|
# Create account function which creates a new authentication info.
|
||||||
def createaccount(username, password, confirmpassword):
|
def createaccount(username, password, confirmpassword):
|
||||||
email = username + "@hotmail.com"
|
email = username + "@hotmail.com"
|
||||||
if password == confirmpassword:
|
if password == confirmpassword:
|
||||||
|
@ -27,7 +27,7 @@ class DBHelper:
|
||||||
else:
|
else:
|
||||||
print("Confirmed password doesn't match to other password.")
|
print("Confirmed password doesn't match to other password.")
|
||||||
|
|
||||||
# Login fuction which verifies the information given.
|
# Login function which verifies the given authentication info.
|
||||||
def login(username, password):
|
def login(username, password):
|
||||||
email = username + "@hotmail.com"
|
email = username + "@hotmail.com"
|
||||||
try:
|
try:
|
||||||
|
@ -90,8 +90,8 @@ class DBHelper:
|
||||||
address = user.val()["Address"]
|
address = user.val()["Address"]
|
||||||
return address
|
return address
|
||||||
|
|
||||||
# Uploads the photo, input should be something like Photos_of_Users/example.png
|
# Uploads the photo, input should be something like "Photos_of_Users/example.png"
|
||||||
# or something like Photos_of_Thieves/example.png for the thieves.
|
# or something like "Photos_of_Thieves/example.png" for the thieves.
|
||||||
def uploadphoto(userphoto):
|
def uploadphoto(userphoto):
|
||||||
userphoto_str = str(userphoto)
|
userphoto_str = str(userphoto)
|
||||||
storage.child(userphoto_str).put(userphoto)
|
storage.child(userphoto_str).put(userphoto)
|
||||||
|
|
Loading…
Reference in a new issue