Commit 0675c446 authored by okhin's avatar okhin 🚴

Adding the db to admin commands, to avoid sqlite3 errors

parent 84c816e6
Pipeline #704 passed with stage
in 3 seconds
...@@ -483,13 +483,13 @@ def static_files(filepath): ...@@ -483,13 +483,13 @@ def static_files(filepath):
@app.get('/admin') @app.get('/admin')
def little_admin(): def little_admin(db):
users = db.execute('SELECT api, token, admin FROM users').fetchall() users = db.execute('SELECT api, token, admin FROM users').fetchall()
return template('index', users=users) return template('index', users=users)
@app.post('/admin') @app.post('/admin')
def medium_admin(): def medium_admin(db):
api = request.forms.get('api') api = request.forms.get('api')
token = request.forms.get('token') token = request.forms.get('token')
admin = request.forms.get('admin') admin = request.forms.get('admin')
......
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