Maybe actually save the game metadata
This commit is contained in:
@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user