add notification
This commit is contained in:
@@ -11,7 +11,7 @@ from aws_lambda_powertools.utilities.data_classes import (
|
||||
)
|
||||
from aws_lambda_powertools.utilities.typing import LambdaContext
|
||||
from layercake.batch import BatchProcessor
|
||||
from layercake.dateutils import now
|
||||
from layercake.dateutils import now, ttl
|
||||
from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair
|
||||
from layercake.extra_types import CnpjStr, CpfStr, NameStr
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
@@ -144,6 +144,20 @@ def _create_user(rawuser: dict, context: dict) -> None:
|
||||
'sk': f'emails#{user.email}',
|
||||
'email_verified': False,
|
||||
'email_primary': True,
|
||||
'mx_record_exists': False,
|
||||
'created_at': now_,
|
||||
}
|
||||
)
|
||||
transact.put(
|
||||
item={
|
||||
'id': user_id,
|
||||
'sk': f'EMAIL_VERIFICATION#{uuid4()}',
|
||||
'fresh_user': True,
|
||||
'name': user.name,
|
||||
'email': user.email,
|
||||
'email_primary': True,
|
||||
'org_name': org.name,
|
||||
'ttl': ttl(start_dt=now_, days=30),
|
||||
'created_at': now_,
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user