mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-14 14:22:16 +00:00
Remove 10s score cockblock as it seems to break things
???????? Make session key show when it was last used
This commit is contained in:
parent
2a1c83a44e
commit
75932f2257
1 changed files with 6 additions and 5 deletions
|
@ -67,22 +67,23 @@ def post():
|
|||
if int(difficulty) not in GAME_DIFFICULTIES:
|
||||
return "Invalid difficulty!"
|
||||
# This is a fix for a bug in the game that we dunno how to actually fix
|
||||
# Yupeeeeeeeeee
|
||||
if score < 10:
|
||||
return "Score is impossible!"
|
||||
# if score < 10:
|
||||
# return "Score is impossible!"
|
||||
|
||||
session_data = Sessions.query.filter_by(auth_key=session_key).first()
|
||||
if not session_data:
|
||||
return "Authentication failed!"
|
||||
|
||||
score = Scores(
|
||||
score_upload = Scores(
|
||||
score=float(score),
|
||||
difficulty=int(difficulty),
|
||||
version=version,
|
||||
user_id=session_data.user_id,
|
||||
)
|
||||
|
||||
db.session.add(score)
|
||||
session_data.last_used = db.func.now()
|
||||
|
||||
db.session.add(score_upload)
|
||||
db.session.commit()
|
||||
|
||||
return "Success!"
|
||||
|
|
Loading…
Add table
Reference in a new issue