Skip to content

Commit 36200ed

Browse files
committed
fix: Change Firebase RTDB event types (.ref instead of .document)
1 parent 827b911 commit 36200ed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Google.Cloud.Functions.Framework.Tests/GcfEvents/GcfConvertersTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public class GcfConvertersTest
3737
[InlineData("firestore_simple.json", "google.cloud.firestore.document.v1.written", "//firestore.googleapis.com/projects/project-id/databases/(default)", "documents/gcf-test/2Vm2mI1d0wIaK2Waj5to")]
3838
[InlineData("pubsub_text.json", "google.cloud.pubsub.topic.v1.messagePublished", "//pubsub.googleapis.com/projects/sample-project/topics/gcf-test", null)]
3939
[InlineData("legacy_pubsub.json", "google.cloud.pubsub.topic.v1.messagePublished", "//pubsub.googleapis.com/projects/sample-project/topics/gcf-test", null)]
40-
[InlineData("firebase-db1.json", "google.firebase.database.document.v1.written", "//firebasedatabase.googleapis.com/projects/_/locations/us-central1/instances/my-project-id", "refs/gcf-test/xyz")]
41-
[InlineData("firebase-db2.json", "google.firebase.database.document.v1.written", "//firebasedatabase.googleapis.com/projects/_/locations/europe-west1/instances/my-project-id", "refs/gcf-test/xyz")]
40+
[InlineData("firebase-db1.json", "google.firebase.database.ref.v1.written", "//firebasedatabase.googleapis.com/projects/_/locations/us-central1/instances/my-project-id", "refs/gcf-test/xyz")]
41+
[InlineData("firebase-db2.json", "google.firebase.database.ref.v1.written", "//firebasedatabase.googleapis.com/projects/_/locations/europe-west1/instances/my-project-id", "refs/gcf-test/xyz")]
4242
[InlineData("firebase-auth1.json", "google.firebase.auth.user.v1.created", "//firebaseauth.googleapis.com/projects/my-project-id", "users/UUpby3s4spZre6kHsgVSPetzQ8l2")]
4343
[InlineData("firebase-auth2.json", "google.firebase.auth.user.v1.deleted", "//firebaseauth.googleapis.com/projects/my-project-id", "users/UUpby3s4spZre6kHsgVSPetzQ8l2")]
4444
[InlineData("firebase-remote-config.json", "google.firebase.remoteconfig.remoteConfig.v1.updated", "//firebaseremoteconfig.googleapis.com/projects/sample-project", null)]

src/Google.Cloud.Functions.Framework/GcfEvents/GcfConverters.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private static class EventTypes
4949
internal const string FirestoreDocumentDeleted = FirestoreDocumentV1 + ".deleted";
5050
internal const string FirestoreDocumentWritten = FirestoreDocumentV1 + ".written";
5151

52-
private const string FirebaseDatabaseDocumentV1 = "google.firebase.database.document.v1";
52+
private const string FirebaseDatabaseDocumentV1 = "google.firebase.database.ref.v1";
5353
internal const string FirebaseDatabaseDocumentCreated = FirebaseDatabaseDocumentV1 + ".created";
5454
internal const string FirebaseDatabaseDocumentUpdated = FirebaseDatabaseDocumentV1 + ".updated";
5555
internal const string FirebaseDatabaseDocumentDeleted = FirebaseDatabaseDocumentV1 + ".deleted";

0 commit comments

Comments
 (0)