Maybe actually save the game metadata

This commit is contained in:
2025-08-30 13:13:25 +02:00
parent 7a60b8a631
commit 2323d64547

View File

@ -36,11 +36,13 @@ def post_arrival():
if not ('checkpoint' in data and 'name' in data): if not ('checkpoint' in data and 'name' in data):
return "Error: Key missing. See docs/API.md for reference.", 400 return "Error: Key missing. See docs/API.md for reference.", 400
game = slugify(data['game'])
name = slugify(data['name']) name = slugify(data['name'])
checkpoint = slugify(data['checkpoint']) checkpoint = slugify(data['checkpoint'])
now = datetime.utcnow().isoformat() + 'Z' now = datetime.utcnow().isoformat() + 'Z'
db.insert({ db.insert({
'game': game,
'name': name, 'name': name,
'checkpoint': checkpoint, 'checkpoint': checkpoint,
'arrival': now, 'arrival': now,