move superpage to eduseg.com.br repo

This commit is contained in:
2025-05-16 19:17:01 -03:00
parent cc9bd08daa
commit 26b1e618b6
150 changed files with 23 additions and 15658 deletions

View File

@@ -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:

View File

@@ -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'),
)
)