From 6b67e27ad24e384e428ed1005d4b494f2babfc46 Mon Sep 17 00:00:00 2001 From: Justin Hsieh <41461549+justin-hsieh@users.noreply.github.com> Date: Tue, 5 Mar 2024 09:50:45 -0700 Subject: [PATCH] Update app.py --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index d3676e6..7384fd1 100644 --- a/app.py +++ b/app.py @@ -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) @@ -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"}' \ No newline at end of file