Skip to content

Commit 161424b

Browse files
author
Ace Nassri
authored
chore(functions): remove RTDB path params (GoogleCloudPlatform#5548)
1 parent d65cedb commit 161424b

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

functions/firebase/main.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ def hello_rtdb(data, context):
3838
"""
3939
trigger_resource = context.resource
4040

41-
if 'params' in data:
42-
print('Path parameters:')
43-
for param, value in data['params'].items():
44-
print(f' {param}: {value}')
45-
4641
print('Function triggered by change to: %s' % trigger_resource)
4742
print('Admin?: %s' % data.get("admin", False))
4843
print('Delta:')

functions/firebase/main_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ class Context(object):
2929
def test_rtdb(capsys):
3030
data = {
3131
'admin': True,
32-
'delta': {'id': 'my-data'},
33-
'params': {'baz': 'quux'}
32+
'delta': {'id': 'my-data'}
3433
}
3534

3635
context = Context()
@@ -40,7 +39,6 @@ def test_rtdb(capsys):
4039

4140
out, _ = capsys.readouterr()
4241

43-
assert 'baz: quux' in out
4442
assert 'Function triggered by change to: my-resource' in out
4543
assert 'Admin?: True' in out
4644
assert 'my-data' in out

0 commit comments

Comments
 (0)