Files
saladeaula.digital/api.saladeaula.digital/app/routes/orgs/seats.py
2026-01-25 04:52:44 -03:00

17 lines
459 B
Python

from aws_lambda_powertools.event_handler.api_gateway import Router
from layercake.dynamodb import DynamoDBPersistenceLayer, PartitionKey
from boto3clients import dynamodb_client
from config import ENROLLMENT_TABLE
router = Router()
dyn = DynamoDBPersistenceLayer(ENROLLMENT_TABLE, dynamodb_client)
@router.get('/<org_id>/seats')
def seats(org_id: str):
return dyn.collection.query(
PartitionKey(f'SEAT#ORG#{org_id}'),
limit=150,
)