Fixes in change theme for users
This commit is contained in:
parent
48a57570cb
commit
b0881e7267
1 changed files with 5 additions and 0 deletions
|
|
@ -445,10 +445,15 @@ def auth_check():
|
|||
@admin_app.route('/admin/change_theme/')
|
||||
def change_theme():
|
||||
|
||||
db=g.connection
|
||||
|
||||
theme_selected=str(request.args.get('theme', '0'))
|
||||
|
||||
session['theme']=theme_selected
|
||||
|
||||
if not db.query('update useradmin set dark_theme=%s WHERE id=%s', [session['theme'], session['user_id']]):
|
||||
error=1
|
||||
|
||||
error=0
|
||||
|
||||
return {'error': error}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue