Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: formatting
  • Loading branch information
exaby73 committed Jul 9, 2024
commit e5a23234b44f762cc9c5945b0f33f78af79ee887
11 changes: 5 additions & 6 deletions src/firebase_functions/firestore_fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ def _firestore_endpoint_handler(
app = get_app()
firestore_client = _firestore_v1.Client(project=app.project_id,
database=event_database)
firestore_ref: DocumentReference = firestore_client.document(
event_document)
firestore_ref: DocumentReference = firestore_client.document(event_document)
value_snapshot: DocumentSnapshot | None = None
old_value_snapshot: DocumentSnapshot | None = None

Expand Down Expand Up @@ -273,7 +272,7 @@ def on_document_written_wrapped(raw: _ce.CloudEvent):

@_util.copy_func_kwargs(FirestoreOptions)
def on_document_written_with_auth_context(**kwargs
) -> _typing.Callable[[_C1], _C1]:
) -> _typing.Callable[[_C1], _C1]:
"""
Event handler that triggers when a document is created, updated, or deleted in Firestore.
This trigger will also provide the authentication context of the principal who triggered
Expand Down Expand Up @@ -372,7 +371,7 @@ def on_document_updated_wrapped(raw: _ce.CloudEvent):

@_util.copy_func_kwargs(FirestoreOptions)
def on_document_updated_with_auth_context(**kwargs
) -> _typing.Callable[[_C1], _C1]:
) -> _typing.Callable[[_C1], _C1]:
"""
Event handler that triggers when a document is updated in Firestore.
This trigger will also provide the authentication context of the principal who triggered
Expand Down Expand Up @@ -471,7 +470,7 @@ def on_document_created_wrapped(raw: _ce.CloudEvent):

@_util.copy_func_kwargs(FirestoreOptions)
def on_document_created_with_auth_context(**kwargs
) -> _typing.Callable[[_C2], _C2]:
) -> _typing.Callable[[_C2], _C2]:
"""
Event handler that triggers when a document is created in Firestore.
This trigger will also provide the authentication context of the principal who triggered
Expand Down Expand Up @@ -570,7 +569,7 @@ def on_document_deleted_wrapped(raw: _ce.CloudEvent):

@_util.copy_func_kwargs(FirestoreOptions)
def on_document_deleted_with_auth_context(**kwargs
) -> _typing.Callable[[_C2], _C2]:
) -> _typing.Callable[[_C2], _C2]:
"""
Event handler that triggers when a document is deleted in Firestore.
This trigger will also provide the authentication context of the principal who triggered
Expand Down