move superpage to eduseg.com.br repo
This commit is contained in:
@@ -26,6 +26,7 @@ Example
|
||||
from dataclasses import asdict, dataclass
|
||||
from typing import Any
|
||||
|
||||
import boto3
|
||||
from aws_lambda_powertools import Logger, Tracer
|
||||
from aws_lambda_powertools.utilities.data_classes import event_source
|
||||
from aws_lambda_powertools.utilities.data_classes.api_gateway_authorizer_event import (
|
||||
@@ -33,7 +34,6 @@ from aws_lambda_powertools.utilities.data_classes.api_gateway_authorizer_event i
|
||||
APIGatewayAuthorizerResponseV2,
|
||||
)
|
||||
from aws_lambda_powertools.utilities.typing import LambdaContext
|
||||
import boto3
|
||||
from botocore.endpoint_provider import Enum
|
||||
from layercake.dynamodb import DynamoDBCollection, DynamoDBPersistenceLayer, KeyPair
|
||||
from layercake.funcs import pick
|
||||
@@ -56,7 +56,8 @@ user_collect = DynamoDBCollection(user_layer)
|
||||
@event_source(data_class=APIGatewayAuthorizerEventV2)
|
||||
def lambda_handler(event: APIGatewayAuthorizerEventV2, context: LambdaContext) -> dict:
|
||||
"""Authenticates a user using a bearer token (for user or API).
|
||||
Only handles authentication; any additional logic (e.g., tenant) is performed afterward."""
|
||||
Only handles authentication; any additional logic (e.g., tenant)
|
||||
is performed afterward."""
|
||||
bearer = _parse_bearer_token(event.headers.get('authorization', ''))
|
||||
|
||||
if not bearer:
|
||||
|
||||
@@ -33,5 +33,7 @@ def get_vacancies():
|
||||
tenant: Tenant = router.context['tenant']
|
||||
|
||||
return enrollment_collect.query(
|
||||
PartitionKey(ComposeKey(str(tenant.id), prefix='vacancies'))
|
||||
PartitionKey(
|
||||
ComposeKey(str(tenant.id), prefix='vacancies'),
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user