wip checkout
This commit is contained in:
16
api.saladeaula.digital/app/routes/orgs/seats.py
Normal file
16
api.saladeaula.digital/app/routes/orgs/seats.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from aws_lambda_powertools.event_handler.api_gateway import Router
|
||||
from layercake.dynamodb import DynamoDBPersistenceLayer, PartitionKey
|
||||
|
||||
from boto3clients import dynamodb_client
|
||||
from config import COURSE_TABLE
|
||||
|
||||
router = Router()
|
||||
dyn = DynamoDBPersistenceLayer(COURSE_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,
|
||||
)
|
||||
Reference in New Issue
Block a user