Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-hsieh committed Mar 5, 2024
1 parent 96cbb2a commit 6b67e27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def calculate_most_points_post():
year = point_request['year']

points = get_most_position_points(
contest_list[contest]['position'], contest_list[contest]['stat'], OWNERS, year, week)
contest_list[contest]['position'], contest_list[contest]['stat'], OWNERS, year, int(week))
if contest_list[contest].get('single'):
points = get_highest_points(points)

Expand All @@ -60,6 +60,6 @@ def calculate_most_points_post():

# Add data to firestore
db = firestore.client()
doc_ref = db.collection(year).document(output_week)
doc_ref.set(result_dict)
doc_ref = db.collection('yearly_data').document(year)
doc_ref.collection("contests").document(output_week).set(result_dict)
return '{"status":"200", "data": "OK"}'

0 comments on commit 6b67e27

Please sign in to comment.