add register temp

This commit is contained in:
Mateusz779 2023-04-13 12:26:49 +02:00
parent ec0441d621
commit fd36c7d4d6

4
app.py
View File

@ -36,7 +36,9 @@ def login():
def login_api(): def login_api():
username = request.form['username'] username = request.form['username']
password = request.form['password'] password = request.form['password']
#register
db.add_user(username, password)
#register
auth_token = db.login(username, password) auth_token = db.login(username, password)
if auth_token is None: if auth_token is None:
return render_template('login.html', incorrect="Incorrect username or password!") return render_template('login.html', incorrect="Incorrect username or password!")