wip emails
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import json
|
||||
from datetime import datetime
|
||||
from http import HTTPStatus
|
||||
from io import BytesIO
|
||||
@@ -114,21 +113,19 @@ def sample(course_id: str, s3_uri: Annotated[str, Body(embed=True)]):
|
||||
# Send template URI and data to Paperforge API to generate a PDF
|
||||
r = requests.post(
|
||||
PAPERFORGE_API,
|
||||
data=json.dumps(
|
||||
{
|
||||
'template_uri': s3_uri,
|
||||
'args': {
|
||||
'name': 'Juscelino Kubitschek',
|
||||
'cpf': '***.810.132-**',
|
||||
'score': 100,
|
||||
'started_at': now_.strftime('%d/%m/%Y'),
|
||||
'completed_at': now_.strftime('%d/%m/%Y'),
|
||||
'today': _datefmt(now_),
|
||||
'year': now_.strftime('%Y'),
|
||||
'expires_at': now_.strftime('%d/%m/%Y'),
|
||||
},
|
||||
json={
|
||||
'template_uri': s3_uri,
|
||||
'args': {
|
||||
'name': 'Juscelino Kubitschek',
|
||||
'cpf': '***.810.132-**',
|
||||
'score': 100,
|
||||
'started_at': now_.strftime('%d/%m/%Y'),
|
||||
'completed_at': now_.strftime('%d/%m/%Y'),
|
||||
'today': _datefmt(now_),
|
||||
'year': now_.strftime('%Y'),
|
||||
'expires_at': now_.strftime('%d/%m/%Y'),
|
||||
},
|
||||
),
|
||||
},
|
||||
)
|
||||
r.raise_for_status()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user