wip checkout
This commit is contained in:
@@ -4,7 +4,7 @@ from .admins import router as admins
|
||||
from .billing import router as billing
|
||||
from .custom_pricing import router as custom_pricing
|
||||
from .enrollments.scheduled import router as scheduled
|
||||
from .enrollments.submission import router as submission
|
||||
from .enrollments.submissions import router as submissions
|
||||
from .users.add import router as users
|
||||
from .users.batch_jobs import router as batch_jobs
|
||||
|
||||
@@ -15,7 +15,7 @@ __all__ = [
|
||||
'billing',
|
||||
'custom_pricing',
|
||||
'scheduled',
|
||||
'submission',
|
||||
'submissions',
|
||||
'users',
|
||||
'batch_jobs',
|
||||
]
|
||||
|
||||
@@ -24,7 +24,7 @@ class MemberNotFoundError(NotFoundError): ...
|
||||
|
||||
|
||||
@router.get('/<org_id>/admins')
|
||||
def get_admins(org_id: str):
|
||||
def admins(org_id: str):
|
||||
return dyn.collection.query(
|
||||
# Post-migration: rename `admins` to `ADMIN`
|
||||
KeyPair(org_id, 'admins#'),
|
||||
|
||||
@@ -9,7 +9,7 @@ dyn = DynamoDBPersistenceLayer(COURSE_TABLE, dynamodb_client)
|
||||
|
||||
|
||||
@router.get('/<org_id>/custom-pricing')
|
||||
def get_custom_pricing(org_id: str):
|
||||
def custom_pricing(org_id: str):
|
||||
return dyn.collection.query(
|
||||
PartitionKey(f'CUSTOM_PRICING#ORG#{org_id}'),
|
||||
limit=150,
|
||||
|
||||
@@ -19,7 +19,7 @@ def submissions(org_id: str):
|
||||
)
|
||||
|
||||
|
||||
@router.get('/<org_id>/enrollments/<submission_id>/submitted')
|
||||
@router.get('/<org_id>/enrollments/submissions/<submission_id>')
|
||||
def submitted(org_id: str, submission_id: str):
|
||||
return dyn.collection.get_item(
|
||||
KeyPair(
|
||||
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