Skip to content

Commit f703653

Browse files
committed
Single quotes to double quotes
1 parent e17f964 commit f703653

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

functions/log-event/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
func = Function.instance()
99

1010

11-
@func.handler(method='POST', path='/log-event')
11+
@func.handler(method="POST", path="/log-event")
1212
def on_post(request: Request) -> Response:
1313
# Validate request
14-
if 'event_data' not in request.body:
14+
if "event_data" not in request.body:
1515
return Response(
1616
code=400,
17-
errors=[APIError(code=400, message='missing event_data')]
17+
errors=[APIError(code=400, message="missing event_data")]
1818
)
1919

20-
event_data = request.body['event_data']
20+
event_data = request.body["event_data"]
2121

2222
try:
2323
# Store data in a collection
@@ -47,7 +47,7 @@ def on_post(request: Request) -> Response:
4747
)
4848

4949
if response["status_code"] != 200:
50-
error_message = response.get('error', {}).get('message', 'Unknown error')
50+
error_message = response.get("error", {}).get("message", "Unknown error")
5151
return Response(
5252
code=response["status_code"],
5353
errors=[APIError(
@@ -78,5 +78,5 @@ def on_post(request: Request) -> Response:
7878
)
7979

8080

81-
if __name__ == '__main__':
81+
if __name__ == "__main__":
8282
func.run()

0 commit comments

Comments
 (0)