Skip to content

Commit

Permalink
Merge pull request #32 from justin-hsieh/adjust_firebase
Browse files Browse the repository at this point in the history
Update app.py
  • Loading branch information
justin-hsieh authored Mar 5, 2024
2 parents 96cbb2a + 6b67e27 commit 66f5612
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 66f5612

Please sign in to comment.