add new functionality to config, info to redeems
This commit is contained in:
		
							parent
							
								
									e4850ab89f
								
							
						
					
					
						commit
						73194a0fc8
					
				| @ -2,4 +2,5 @@ SECRET_KEY='dev' | ||||
| OWNCAST_ACCESS_TOKEN='' | ||||
| OWNCAST_INSTANCE_URL='http://localhost:8080' | ||||
| POINTS_CYCLE_TIME=600 | ||||
| POINTS_AMOUNT_GIVEN=10 | ||||
| POINTS_AMOUNT_GIVEN=10 | ||||
| LIST_REDEEMS=True | ||||
| @ -1,6 +1,6 @@ | ||||
| REDEEMS={ | ||||
|     "hydrate": {"price": 60, "type": "list"}, | ||||
|     "lurk": {"price": 1, "type": "counter"}, | ||||
|     "react": {"price": 200, "type": "note"}, | ||||
|     "request": {"price": 100, "type": "note"} | ||||
|     "react": {"price": 200, "type": "note", "info": "Attach a link to a video for me to react to."}, | ||||
|     "request": {"price": 100, "type": "note", "info": "Request a gamemode, level, skin, etc."} | ||||
| } | ||||
| @ -1,4 +1,4 @@ | ||||
| from flask import render_template, Blueprint, request | ||||
| from flask import render_template, Blueprint, request, current_app | ||||
| from tlapbot.db import get_db | ||||
| from tlapbot.owncast_helpers import (pretty_redeem_queue, all_counters, | ||||
|         read_all_users_with_username) | ||||
| @ -12,6 +12,7 @@ def dashboard(): | ||||
|     db = get_db() | ||||
|     queue = pretty_redeem_queue(db) | ||||
|     counters = all_counters(db) | ||||
|     redeems = current_app.config['REDEEMS'] | ||||
|     username = request.args.get("username") | ||||
|     if username is not None: | ||||
|         users = read_all_users_with_username(db, username) | ||||
| @ -21,6 +22,7 @@ def dashboard(): | ||||
|     return render_template('dashboard.html', | ||||
|                            queue=queue, | ||||
|                            counters=counters, | ||||
|                            redeems=redeems, | ||||
|                            username=username, | ||||
|                            users=users, | ||||
|                            utc_timezone=utc_timezone) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user