add apikey

This commit is contained in:
2025-03-27 01:14:18 -03:00
parent 7021833476
commit 8118dfd403
14 changed files with 114 additions and 69 deletions

View File

@@ -32,7 +32,7 @@ class BadRequestError(MissingError, PowertoolsBadRequestError): ...
router = Router()
user_layer = DynamoDBPersistenceLayer(USER_TABLE, dynamodb_client)
collect = DynamoDBCollection(user_layer, exception_cls=BadRequestError)
collect = DynamoDBCollection(user_layer, exc_cls=BadRequestError)
elastic_client = Elasticsearch(**ELASTIC_CONN)
@@ -98,7 +98,7 @@ def get_idp(id: str):
)
def get_emails(id: str):
return collect.get_items(
KeyPair(id, PrefixKey('emails#')),
KeyPair(id, PrefixKey('emails')),
start_key=router.current_event.get_query_string_value('start_key', None),
)
@@ -126,6 +126,6 @@ def get_logs(id: str):
)
def get_orgs(id: str):
return collect.get_items(
KeyPair(id, PrefixKey('orgs#')),
KeyPair(id, PrefixKey('orgs')),
start_key=router.current_event.get_query_string_value('start_key', None),
)