Commit 2c29fb36 authored by okhin's avatar okhin 🚴

Merge branch '6-fix-auth-for-admin' into 'master'

Fixing the syntax for the SQLite statement

Closes #6

See merge request !8
parents 071b4160 007c5453
Pipeline #931 passed with stage
in 4 seconds
......@@ -465,7 +465,7 @@ def static_files(filepath):
def login_admin(user, password):
db = sqlite3.connect(config['piphone']['db'])
user = db.execute('SELECT api, token, admin FROM users where api = ?', user)
user = db.execute('SELECT api, token, admin FROM users where api = ?', (user,))
user = user.fetchone()
if user is None:
# user does not exist
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment