Commit 201453f1 authored by okhin's avatar okhin 🚴

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

Resolve "Fix auth for admin"

Closes #6

See merge request !6
parents df58ec87 85dbc7b0
Pipeline #929 passed with stage
in 5 seconds
......@@ -464,7 +464,8 @@ def static_files(filepath):
return static_file(filepath, root='./views')
def login_admin(user, password):
user = db.execute('SELECT api, token, admin FROM users where api = ?', user).fetchone()
user = db.execute('SELECT api, token, admin FROM users where api = ?', user)
user = user.fetchone()
if user is None:
# user does not exist
return False
......
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