simplify dashboard file
removed redundant assignments to variables
This commit is contained in:
parent
3282072b42
commit
a5463c09ee
|
@ -10,9 +10,6 @@ bp = Blueprint('redeem_dashboard', __name__)
|
||||||
@bp.route('/dashboard', methods=['GET'])
|
@bp.route('/dashboard', methods=['GET'])
|
||||||
def dashboard():
|
def dashboard():
|
||||||
db = get_db()
|
db = get_db()
|
||||||
queue = pretty_redeem_queue(db)
|
|
||||||
counters = all_counters(db)
|
|
||||||
redeems = current_app.config['REDEEMS']
|
|
||||||
username = request.args.get("username")
|
username = request.args.get("username")
|
||||||
if username is not None:
|
if username is not None:
|
||||||
users = read_all_users_with_username(db, username)
|
users = read_all_users_with_username(db, username)
|
||||||
|
@ -20,9 +17,9 @@ def dashboard():
|
||||||
users = []
|
users = []
|
||||||
utc_timezone = timezone.utc
|
utc_timezone = timezone.utc
|
||||||
return render_template('dashboard.html',
|
return render_template('dashboard.html',
|
||||||
queue=queue,
|
queue=pretty_redeem_queue(db),
|
||||||
counters=counters,
|
counters=all_counters(db),
|
||||||
redeems=redeems,
|
redeems=current_app.config['REDEEMS'],
|
||||||
username=username,
|
username=username,
|
||||||
users=users,
|
users=users,
|
||||||
utc_timezone=utc_timezone)
|
utc_timezone=utc_timezone)
|
||||||
|
|
Loading…
Reference in New Issue