Skip to content

Commit 17079ad

Browse files
Add missing results wrapper
1 parent ee00134 commit 17079ad

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/index.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,18 @@ exports.handler = async (event) => {
4444
const ongoingContests = contests.filter(isOngoing).sort(sortByEndTime);
4545
const upcomingContests = contests.filter(isUpcoming).sort(sortByStartTime);
4646

47-
const contestsJson = JSON.stringify({
48-
timestamp: curTime,
49-
ongoing: ongoingContests,
50-
upcoming: upcomingContests,
47+
const resultsJson = JSON.stringify({
48+
results: {
49+
timestamp: curTime,
50+
ongoing: ongoingContests,
51+
upcoming: upcomingContests,
52+
}
5153
});
5254

5355
const params = {
5456
Bucket: "codercalendar-api",
5557
Key: "response.json",
56-
Body: contestsJson,
58+
Body: resultsJson,
5759
ContentType: "application/json;charset=UTF-8",
5860
ACL: 'public-read'
5961
};

0 commit comments

Comments
 (0)