add signature to pdf

This commit is contained in:
2025-09-23 17:29:17 -03:00
parent 79d46363ca
commit a7096974d5
7 changed files with 70 additions and 15 deletions

View File

@@ -16,3 +16,6 @@ else:
SQLITE_DATABASE = 'app/courses_export_2025-06-18_110214.db'
SQLITE_TABLE = 'courses'
PAPERFORGE_API = 'https://paperforge.saladeaula.digital'
TEMPLATE_URI = 's3://saladeaula.digital/billing/template.html'

View File

@@ -12,10 +12,7 @@ from layercake.dateutils import now
from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair
from boto3clients import dynamodb_client, s3_client
from config import BUCKET_NAME, ORDER_TABLE
PAPERFORGE_API = 'https://weasyprint.saladeaula.digital'
TEMPLATE_S3_URI = 's3://saladeaula.digital/billing/template.html'
from config import BUCKET_NAME, ORDER_TABLE, PAPERFORGE_API, TEMPLATE_URI
logger = Logger(__name__)
order_layer = DynamoDBPersistenceLayer(ORDER_TABLE, dynamodb_client)
@@ -41,8 +38,8 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
json_data = json.dumps(
{
'template_s3_uri': TEMPLATE_S3_URI,
'template_vars': {
'template_uri': TEMPLATE_URI,
'args': {
'start_date': start_date,
'end_date': end_date,
'items': result['items'],