Skip to content

Commit

Permalink
Added to print count result
Browse files Browse the repository at this point in the history
  • Loading branch information
faanskit committed Feb 3, 2024
1 parent 58f0a95 commit 122e390
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/history_inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ async def main():
netlify_function_url, json=data
) as response:
if response.status == 200:
print("Data posted successfully to Netlify function.")
result = await response.json()
count = result.get("count", 0)
print(f"Data posted successfully. Count: {count}")
else:
print(
f"Failed to post data. Status code: {response.status}"
Expand Down

0 comments on commit 122e390

Please sign in to comment.