Remove extraneous route logic

remotes/1693045480750635534/spooky-22
Outrun Colors, LLC 2022-05-29 22:12:13 -05:00
parent c337d0edde
commit 9f384bf548
1 changed files with 4 additions and 10 deletions

View File

@ -11,22 +11,16 @@ from files.helpers.lottery import *
@admin_level_required(3)
@lottery_required
def lottery_end(v):
if v.admin_level > 2:
success, message = end_lottery_session()
return {"message": message} if success else {"error": message}
else:
return {"error": "JL3+ or higher required to start and end lotteries."}, 401
success, message = end_lottery_session()
return {"message": message} if success else {"error": message}
@app.post("/lottery/start")
@admin_level_required(3)
@lottery_required
def lottery_start(v):
if v.admin_level > 2:
start_new_lottery_session()
return {"message": "Lottery started."}
else:
return {"error": "JL3+ or higher required to start and end lotteries."}, 401
start_new_lottery_session()
return {"message": "Lottery started."}
@app.post("/lottery/buy")