update id
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from aws_lambda_powertools import Logger
|
||||
from aws_lambda_powertools.event_handler.api_gateway import Router
|
||||
from aws_lambda_powertools.event_handler.exceptions import NotFoundError
|
||||
from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair
|
||||
from layercake.dynamodb import DynamoDBPersistenceLayer, SortKey, TransactKey
|
||||
|
||||
from boto3clients import dynamodb_client
|
||||
from config import ENROLLMENT_TABLE
|
||||
@@ -20,7 +19,6 @@ dyn = DynamoDBPersistenceLayer(ENROLLMENT_TABLE, dynamodb_client)
|
||||
|
||||
@router.get('/<enrollment_id>')
|
||||
def get_enrollment(enrollment_id: str):
|
||||
return dyn.collection.get_item(
|
||||
KeyPair(enrollment_id, '0'),
|
||||
exc_cls=NotFoundError,
|
||||
return dyn.collection.get_items(
|
||||
TransactKey(enrollment_id) + SortKey('0') + SortKey('ORG') + SortKey('LOCK'),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user