Skip to content

Commit

Permalink
Testing gh action 2
Browse files Browse the repository at this point in the history
  • Loading branch information
zohaib-c committed Jan 11, 2024
1 parent 9359eb3 commit dc6f797
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions function_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.')

table_conn_str = os.environ["TABLE_CONN_STR"]

table_client = TableClient.from_connection_string(conn_str=table_conn_str, table_name="visitorCount")
entity = table_client.get_entity(partition_key="VisitorCount", row_key="CurrentCount")

count = entity["count"] + 1
entity["count"] = count

table_client.update_entity(mode="merge", entity=entity)

return func.HttpResponse(f"{count}", status_code=200)

0 comments on commit dc6f797

Please sign in to comment.