add user id to order
This commit is contained in:
@@ -42,10 +42,10 @@ Resources:
|
||||
Properties:
|
||||
RetentionInDays: 90
|
||||
|
||||
EventAssignTenantCnpjFunction:
|
||||
EventAssignOrgIdFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: events.assign_tenant_cnpj.lambda_handler
|
||||
Handler: events.assign_org_id.lambda_handler
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref EventLog
|
||||
Policies:
|
||||
@@ -65,7 +65,34 @@ Resources:
|
||||
sk: ["0"]
|
||||
cnpj:
|
||||
- exists: true
|
||||
metadata__tenant_id:
|
||||
# Post-migration: rename `tenant_id` to `org_id`
|
||||
tenant_id:
|
||||
- exists: false
|
||||
|
||||
EventAssignUserIdFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: events.assign_user_id.lambda_handler
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref EventLog
|
||||
Policies:
|
||||
- DynamoDBCrudPolicy:
|
||||
TableName: !Ref UserTable
|
||||
- DynamoDBCrudPolicy:
|
||||
TableName: !Ref OrderTable
|
||||
Events:
|
||||
Event:
|
||||
Type: EventBridgeRule
|
||||
Properties:
|
||||
Pattern:
|
||||
resources: [!Ref OrderTable]
|
||||
detail-type: [INSERT]
|
||||
detail:
|
||||
new_image:
|
||||
sk: ["0"]
|
||||
cpf:
|
||||
- exists: true
|
||||
user_id:
|
||||
- exists: false
|
||||
|
||||
EventRemoveSlotsIfCanceledFunction:
|
||||
|
||||
Reference in New Issue
Block a user