community: fixed typo in event-triggers boilerplate (#5222)

This commit is contained in:
Akash Verma 2020-07-02 13:23:44 +05:30 committed by GitHub
parent af452de754
commit 636dc6299f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ def lambda_handler(event, context):
elif body['table']['name'] == 'notes' and body['event']['op'] == 'UPDATE':
message = 'Note {} updated, with data: {}'.format(data['new']['id'], data['new']['note'])
elif body['table'] == 'notes' and body['op'] == 'DELETE':
elif body['table'] == 'notes' and body['event']['op'] == 'DELETE':
message = 'Note {} deleted, with data: {}'.format(data['old']['id'], data['old']['note'])
return {
"statusCode": 200,