add freeze subscription

This commit is contained in:
2026-01-18 12:34:19 -03:00
parent 3f0f7ec1e1
commit ae348377a5
10 changed files with 102 additions and 40 deletions

View File

@@ -1,6 +1,6 @@
from aws_lambda_powertools import Logger
from aws_lambda_powertools.event_handler.api_gateway import Router
from layercake.dynamodb import DynamoDBPersistenceLayer, SortKey, TransactKey
from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair, SortKey, TransactKey
from boto3clients import dynamodb_client
from config import USER_TABLE
@@ -44,4 +44,9 @@ def get_org(org_id: str):
+ SortKey('0')
+ SortKey('METADATA#ADDRESS', rename_key='address')
+ SortKey('METADATA#SUBSCRIPTION', rename_key='subscription')
+ KeyPair(
pk='SUBSCRIPTION#FREEZE',
sk=SortKey(f'ORG#{org_id}'),
rename_key='subscription_freeze',
)
)