Skip to content

Commit f476978

Browse files
committed
Rename api_client to custom_storage for consistency across Foundry samples
1 parent 86d94cb commit f476978

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

functions/log-event/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ def on_post(request: Request) -> Response:
4848
"timestamp": int(time.time())
4949
}
5050

51-
api_client = CustomStorage(ext_headers=_app_headers())
51+
custom_storage = CustomStorage(ext_headers=_app_headers())
5252
collection_name = "event_logs"
5353

54-
response = api_client.PutObject(body=json_data,
54+
response = custom_storage.PutObject(body=json_data,
5555
collection_name=collection_name,
5656
object_key=event_id)
5757

@@ -66,7 +66,7 @@ def on_post(request: Request) -> Response:
6666
)
6767

6868
# Query the collection to retrieve the event by id
69-
query_response = api_client.SearchObjects(filter=f"event_id:'{event_id}'",
69+
query_response = custom_storage.SearchObjects(filter=f"event_id:'{event_id}'",
7070
collection_name=collection_name,
7171
limit=5)
7272

0 commit comments

Comments
 (0)