add never logged to add user

This commit is contained in:
2025-12-02 22:54:47 -03:00
parent d461a507f9
commit 11d66a85d3
7 changed files with 68 additions and 57 deletions

View File

@@ -73,6 +73,16 @@ def add(
'created_at': now_,
}
)
transact.put(
item={
'id': user_id,
'sk': f'EMAIL_VERIFICATION#{uuid4()}',
'name': name,
'email': email,
'ttl': ttl(start_dt=now_, days=30),
'created_at': now_,
}
)
transact.put(
item={
# Post-migration (users): rename `email` to `EMAIL`
@@ -84,16 +94,6 @@ def add(
cond_expr='attribute_not_exists(sk)',
exc_cls=EmailConflictError,
)
transact.put(
item={
'id': user_id,
'sk': f'EMAIL_VERIFICATION#{uuid4()}',
'name': name,
'email': email,
'ttl': ttl(start_dt=now_, days=30),
'created_at': now_,
}
)
return JSONResponse(status_code=HTTPStatus.CREATED)