Commit 071b4160 authored by okhin's avatar okhin 🚴
Browse files

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

Need to create a specific db object for the login_admin, not using the global one. Because thread.

Closes #6

See merge request !7
parents 201453f1 3c091153
Pipeline #930 passed with stage
in 3 seconds
......@@ -464,6 +464,7 @@ def static_files(filepath):
return static_file(filepath, root='./views')
def login_admin(user, password):
db = sqlite3.connect(config['piphone']['db'])
user = db.execute('SELECT api, token, admin FROM users where api = ?', user)
user = user.fetchone()
if user is None:
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