Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
piphone
piphone-sip
Commits
0675c446
Commit
0675c446
authored
Jan 02, 2017
by
okhin
Browse files
Adding the db to admin commands, to avoid sqlite3 errors
parent
84c816e6
Pipeline
#704
passed with stage
in 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
piphone.py
View file @
0675c446
...
...
@@ -483,13 +483,13 @@ def static_files(filepath):
@
app
.
get
(
'/admin'
)
def
little_admin
():
def
little_admin
(
db
):
users
=
db
.
execute
(
'SELECT api, token, admin FROM users'
).
fetchall
()
return
template
(
'index'
,
users
=
users
)
@
app
.
post
(
'/admin'
)
def
medium_admin
():
def
medium_admin
(
db
):
api
=
request
.
forms
.
get
(
'api'
)
token
=
request
.
forms
.
get
(
'token'
)
admin
=
request
.
forms
.
get
(
'admin'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment